我有一个视图,它有一个分配给它的LongPressGestureRecognizer,它调用以下方法:
@IBAction func longPressOnView1Recognized(_ sender: UIGestureRecognizer) {
if sender.state == .began {
// this runs when user's finger is down a "long time"
}
if sender.state == .ended {
// this runs when us
通过使用手势识别器拖动iOS 9并简化对重新排序的新iOS 9支持,我能够在iOS 9上重新排序。
public func beginInteractiveMovementForItemAtIndexPath(indexPath: NSIndexPath) -> Bool // returns NO if reordering was prevented from beginning - otherwise YES
public func updateInteractiveMovementTargetPosition(targetPosition: CGPoint)
public fun