Slide 21
Slide 21 text
SwipeBackAnimator
// ύϥϥοΫεޮՌ
to.view.transform.tx = -containerView.bounds.width * 0.3
UIView.animate(
withDuration: transitionDuration(using: transitionContext),
delay: 0,
options: .curveLinear,
animations: {
to.view.transform = .identity
from.view.transform = CGAffineTransform(translationX: to.view.frame.width,
y: 0)
}, completion: { _ in
from.view.transform = .identity
transitionContext.completeTransition(
!transitionContext.transitionWasCancelled
)
})
ભҠޙͷviewʹύϥϥοΫεޮՌΛ͚ͭͭɺ
ભҠલͷviewΛӈҠಈ