VKRearrangableStackViewDelegate
@objc
public protocol VKRearrangableStackViewDelegate
-
called when a subview is “picked up” by the user
Declaration
Swift
@objc optional func stackViewDidBeginReordering(_ stackView: VKRearrangableStackView)
-
Whenever a user drags a subview for a reordering, the delegate is told whether the direction was forward (left/down) or backward (right/up), as well as what the max and min X or Y values are of the subview
Declaration
Swift
@objc optional func stackView(_ stackView: VKRearrangableStackView, didDragToReorderInForwardDirection forward: Bool, maxPoint: CGPoint, minPoint: CGPoint)
-
didReorderArrangedSubviews - called when reordering ends only if the selected subview’s index changed during reordering
Declaration
Swift
@objc optional func stackViewDidReorderArrangedSubviews(_ stackView: VKRearrangableStackView, reorderedView: UIView, fromIndex: Int, toIndex: Int)
-
didEndReordering - called when reordering ends
Declaration
Swift
@objc optional func stackViewDidEndReordering(_ stackView: VKRearrangableStackView)
-
called when reordering is cancelled
Declaration
Swift
@objc optional func stackViewDidCancelReordering(_ stackView: VKRearrangableStackView)
-
Tells the ReorderableStackView whether or not the pressed subview may be picked up.
Declaration
Swift
@objc optional func stackView(_ stackView: VKRearrangableStackView, canReorderSubview subview: UIView, atIndex index: Int) -> Bool
-
Tells the ReorderableStackView whether or not the held subview can take the spot at which is being held.
Declaration
Swift
@objc optional func stackView(_ stackView: VKRearrangableStackView, shouldAllowSubview subview: UIView, toMoveToIndex index: Int) -> Bool