Skip to content

Instantly share code, notes, and snippets.

@ohlulu
Last active June 21, 2019 13:55
Show Gist options
  • Save ohlulu/508afcf0bb091f3370b68a77598eb35c to your computer and use it in GitHub Desktop.
Save ohlulu/508afcf0bb091f3370b68a77598eb35c to your computer and use it in GitHub Desktop.
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