This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://developer.apple.com/reference/uikit/uiviewcontrollertransitioningdelegate | |
class AnimationController: NSObject, UIViewControllerAnimatedTransitioning { | |
func transitionDuration(using transitionContext: UIViewControllerContextTransitioning?) -> TimeInterval { | |
return 0.2 // The duration of the animation | |
} | |
func animateTransition(using transitionContext: UIViewControllerContextTransitioning) { | |
// Since you are presenting a new view controller, you primarily need the new view controller |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
class HomeCollectionViewFlowLayout: UICollectionViewFlowLayout { | |
var isSetUp = false | |
override func prepare() { | |
super.prepare() | |
setUpIfNeeded() |
OlderNewer