diff --git a/DropDown/src/DropDown.swift b/DropDown/src/DropDown.swift index 25fa2b2..e5da75c 100644 --- a/DropDown/src/DropDown.swift +++ b/DropDown/src/DropDown.swift @@ -102,7 +102,7 @@ public final class DropDown: UIView { /// The view to which the drop down will displayed onto. - public weak var anchorView: AnchorView? { + @objc public weak var anchorView: AnchorView? { didSet { setNeedsUpdateConstraints() } } @@ -120,7 +120,7 @@ public final class DropDown: UIView { left corner for its origin, so an offset equal to (0, 0). You can change here the default drop down origin. */ - public var topOffset: CGPoint = .zero { + @objc public var topOffset: CGPoint = .zero { didSet { setNeedsUpdateConstraints() } } @@ -131,7 +131,7 @@ public final class DropDown: UIView { left corner for its origin, so an offset equal to (0, 0). You can change here the default drop down origin. */ - public var bottomOffset: CGPoint = .zero { + @objc public var bottomOffset: CGPoint = .zero { didSet { setNeedsUpdateConstraints() } } @@ -370,7 +370,7 @@ public final class DropDown: UIView { Changing the data source automatically reloads the drop down. */ - public var dataSource = [String]() { + @objc public var dataSource = [String]() { didSet { deselectRows(at: selectedRowIndices) reloadAllComponents() @@ -412,7 +412,7 @@ public final class DropDown: UIView { } /// The action to execute when the user selects a cell. - public var selectionAction: SelectionClosure? + @objc public var selectionAction: SelectionClosure? /** The action to execute when the user selects multiple cells.