Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class SomeViewController: UIViewController {
- let collectionView: UICollectionView = UICollectionView(frame: CGRect.zero, collectionViewLayout: SomeLayout())
- override func viewDidLoad() {
- super.viewDidLoad()
- let toLayout: UICollectionViewLayout = AnotherLayout()
- collectionView.startInteractiveTransition(to: toLayout, completion: { [weak self] (_, _) in
- guard let slf = self else { return }
- let isInTransition = (slf.collectionView.collectionViewLayout as? UICollectionViewTransitionLayout) != nil // false
- })
- let isInTransition = (slf.collectionView.collectionViewLayout as? UICollectionViewTransitionLayout) != nil // true
- }
- }
Add Comment
Please, Sign In to add comment