Almost similar app store transition.
Transition/DismissBehaviour.swift
Transition/Presenter.swift
Transition/UIViewTouchFeedback.swift
extension HomeViewController: HomeController {
var linkView: UIView { sharedView }
}
extension DetailViewController: DetailController {
}
presenter = Presenter(params: .init(from: home, to: detail))
presenter.present()
cardView.enableTouchFeedback(enable: true) { (down, view) in
UIView.animate(withDuration: 0.6, delay: 0.0, usingSpringWithDamping: 0.5, initialSpringVelocity: 0.0, options: [.allowUserInteraction], animations: {
view.transform = down ? CGAffineTransform.init(scaleX: 0.97, y: 0.97) : CGAffineTransform.identity
}, completion: nil)
}
presenter?.scrollView = scrollView
scrollView.delegate = self
extension DetailViewController: UIScrollViewDelegate {
func scrollViewDidScroll(_ scrollView: UIScrollView) {
presenter?.behaviour.scrollViewDidScroll(scrollView)
}
func scrollViewWillEndDragging(_ scrollView: UIScrollView, withVelocity velocity: CGPoint, targetContentOffset: UnsafeMutablePointer<CGPoint>) {
presenter?.behaviour.scrollViewWillEndDragging(scrollView, withVelocity: velocity, targetContentOffset: targetContentOffset)
}
}
Github: iOS 11 App Store Transition
Raywenderlich: Custom View Controller Presentation Transitions
Looking forward to hear from you