Last active
June 21, 2019 13:55
-
-
Save ohlulu/508afcf0bb091f3370b68a77598eb35c to your computer and use it in GitHub Desktop.
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
class CustomPresentAnimation: NSObject , UIViewControllerAnimatedTransitioning { | |
var startPoint: CGPoint // 擴散的起始點 | |
private let durationTime = 0.45 // 動畫時間 | |
init(startPoint: CGPoint) { | |
self.startPoint = startPoint | |
super.init() | |
} | |
func transitionDuration(using transitionContext: UIViewControllerContextTransitioning?) -> TimeInterval { | |
return durationTime | |
} | |
func animateTransition(using transitionContext: UIViewControllerContextTransitioning) { | |
// ... | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment