Guest User

Untitled

a guest
Oct 20th, 2017
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.40 KB | None | 0 0
  1. class WordCollectionViewController: UICollectionViewController, UICollectionViewLayout {
  2. // ...
  3. override func invalidationContext(forInteractivelyMovingItems targetIndexPaths: [IndexPath], withTargetPosition targetPosition: CGPoint, previousIndexPaths: [IndexPath], previousPosition: CGPoint) -> UICollectionViewLayoutInvalidationContext {
  4. var context = super.invalidationContext(forInteractivelyMovingItems: targetIndexPaths, withTargetPosition: targetPosition, previousIndexPaths: previousIndexPaths, previousPosition: previousPosition)
  5.  
  6. return context
  7. }
  8. }
  9.  
  10. class ViewController: UIViewController, UITextFieldDelegate {
  11.  
  12. }
  13.  
  14. protocol hasAVariablePotato {
  15. var potato: String! { get set }
  16. }
  17.  
  18. class PotatoFarmer: Farmer, hasAVariablePotato {
  19.  
  20. }
  21.  
  22. class PotatoFarmer: Farmer, hasAVariablePotato {
  23. var potato: String!
  24. }
  25.  
  26. import Foundation
  27. import UIKit
  28.  
  29. class Test:UICollectionViewLayout{
  30.  
  31. override func invalidationContext(forInteractivelyMovingItems targetIndexPaths: [IndexPath], withTargetPosition targetPosition: CGPoint, previousIndexPaths: [IndexPath], previousPosition: CGPoint) -> UICollectionViewLayoutInvalidationContext {
  32. var context = super.invalidationContext(forInteractivelyMovingItems: targetIndexPaths, withTargetPosition: targetPosition, previousIndexPaths: previousIndexPaths, previousPosition: previousPosition)
  33.  
  34. return context
  35. }
  36. }
Add Comment
Please, Sign In to add comment