ZoomTransitioning
provides a custom transition with image zooming animation.
When you use this library with UINavigationController
, you can pop view controller with edge swiping.
Run the demo project in the Demo directory without carthage update
or pod install
.
Refer to the example project for details.
extension ImageListViewController: ZoomTransitionSourceDelegate {
func transitionSourceImageView() -> UIImageView {
return selectedImageView
}
func transitionSourceImageViewFrame(forward forward: Bool) -> CGRect {
return selectedImageView.convertRect(selectedImageView.bounds, toView: view)
}
func transitionSourceWillBegin() {
selectedImageView.hidden = true
}
func transitionSourceDidEnd() {
selectedImageView.hidden = false
}
func transitionSourceDidCancel() {
selectedImageView.hidden = false
}
}
extension ImageDetailViewController: ZoomTransitionDestinationDelegate {
func transitionDestinationImageViewFrame(forward forward: Bool) -> CGRect