ZoomTransitioning provides a custom transition with image zooming animation and swiping the screen edge.

Overview

ZoomTransitioning

Join the chat at https://gitter.im/WorldDownTown/ZoomTransitioning

License Swift Carthage compatible CocoaPods compatible CocoaPods Awesome

Overview

ZoomTransitioning provides a custom transition with image zooming animation. When you use this library with UINavigationController, you can pop view controller with edge swiping.

Demo

Run the demo project in the Demo directory without carthage update or pod install.

Usage

Refer to the example project for details.

import ZoomTransitioning

Adopt ZoomTransitionSourceDelegate to source view controller

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
    }
}

Adopt ZoomTransitionDestinationDelegate to destination view controller

extension ImageDetailViewController: ZoomTransitionDestinationDelegate {

    func transitionDestinationImageViewFrame(forward forward: Bool) -> CGRect {
        if forward {
            let x: CGFloat = 0.0
            let y = topLayoutGuide.length
            let width = view.frame.width
            let height = width * 2.0 / 3.0
            return CGRect(x: x, y: y, width: width, height: height)
        } else {
            return largeImageView.convertRect(largeImageView.bounds, toView: view)
        }
    }

    func transitionDestinationWillBegin() {
        largeImageView.hidden = true
    }

    func transitionDestinationDidEnd(transitioningImageView imageView: UIImageView) {
        largeImageView.hidden = false
        largeImageView.image = imageView.image
    }

    func transitionDestinationDidCancel() {
        largeImageView.hidden = false
    }
}

set delegate property of UINavigationController

import ZoomTransitioning

class NavigationController: UINavigationController {

    private let zoomNavigationControllerDelegate = ZoomNavigationControllerDelegate()

    required init?(coder aDecoder: NSCoder) {
        super.init(coder: aDecoder)

        delegate = zoomNavigationControllerDelegate
    }
}

Requirements

  • Swift 4.0
  • iOS 9.0 or later

If you use Swift 2.2, use 1.3.0

Installation

Carthage

ZoomTransitioning is available through Carthage. To install it, simply add the following line to your Cartfile:

github "WorldDownTown/ZoomTransitioning"

CocoaPods

ZoomTransitioning is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'ZoomTransitioning'

Manually

  1. Download and drop /ZoomTransitioningfolder in your project.
  2. Congratulations!

Author

WorldDownTown, [email protected]

License

ZoomTransitioning is available under the MIT license. See the LICENSE file for more info.

Comments
  • Navigation Controller Interactive pop gesture in IOS10

    Navigation Controller Interactive pop gesture in IOS10

    Hi! This is great work. Congrats! I'm working on a project for IOS10. I'm not using ZoomTransitioning, but I do use your approach to retrieve the navigation controller's default interactivePopGesture recogniser and tie it to the behavior of my own gesture, which drives my custom transition. It worked great on IOS9 but not at all in IOS10. At first i thought there was something wrong with my code, but I tried your zoomTransitioning Demo and it showed the same result as mine: on IOS10 the edge pan gesture drives the default pop animation and not the custom animation transition :( I tried to fix this with some fine tuning of the ZoomInteractiveTransition gesture delegate but nothing worked. I can't see anything wrong with the code. Was wondering if you might know of a fix. Thanks!

    opened by manuelCarlos 7
  • Requirements iOS version

    Requirements iOS version

    Hello.

    I have a question about the requirements iOS version. Requirements version and read the README. Wrote 8.0, But you are prompted to 9.3 or more iOS versions when you build the project. This is the error.

    Module file's minimum deployment target is ios9.3 v9.3: /Users/hikaru/ios/test/Carthage/Build/iOS/ZoomTransitioning.framework/Modules/ZoomTransitioning.swiftmodule/x86_64.swiftmodule
    
    2016-09-20 23 34 59

    Also deploy version when you check here has become to 9.3. https://github.com/WorldDownTown/ZoomTransitioning/blob/master/ZoomTransitioning.xcodeproj/project.pbxproj#L201

    Is it possible to build in less than 9.3? 2016-09-20 23 35 13

    Version of Xcode is using 7.3.1.

    opened by hikarut 3
  • Cocoapods is still delivering v1.1.2

    Cocoapods is still delivering v1.1.2

    Cocoapods is still dispensing v 1.1.2 of the repository instead of 1.4.0. My workaround is to use the direct link for now:

    pod 'ZoomTransitioning', :git => 'https://github.com/WorldDownTown/ZoomTransitioning.git'

    screen shot 2016-12-07 at 3 57 58 pm
    opened by gravicle 2
  • Can't go back from collectionViewController and Animation not working if the inheritance is more than 2 ViewControllers

    Can't go back from collectionViewController and Animation not working if the inheritance is more than 2 ViewControllers

    (A)TabBarController --> (B)Navigation Controller --> (C)ViewController -> (D)TableViewController -> (E)ZoomNavigationController -> (F)CollectionViewController -> (G)DetailViewController

    1. It works but I can't go back from (F) to (D) (the back button is not showing up)
    2. Tabbar has been disappeared.

    I have tried to Put ZoomNavigationController before (D) but the animation does not work.

    opened by unittesting0 2
  • try fix 'interactivePopGestureRecognizer'  issue

    try fix 'interactivePopGestureRecognizer' issue

    opened by winddpan 1
  • iOS10, trigger system interactivePopGestureRecognizer will pop twice

    iOS10, trigger system interactivePopGestureRecognizer will pop twice

    In the demo, I insert a UIViewController before the ImageListViewController, and I trigger the system interactivePopGestureRecognizer in ImageDetailViewController, then it poped twice, skipped the ImageListViewController. ss

    opened by winddpan 1
  • About zoomTransition from round imageView to another round ImageView

    About zoomTransition from round imageView to another round ImageView

    HI, I have a round image view transition to another round imageview, Before transition the imageView will show rectangle imageView. Then do the transition. And before finished it still a rectangle imageview then hidden.

    Is any hint that I can do it with round ImageView?

    Thank you very much. This Framework is awesome.

    opened by lyc2345 1
  • Rewrite Source and Destination protocols as Swift 2.0+ Style protocols

    Rewrite Source and Destination protocols as Swift 2.0+ Style protocols

    I thought that this might be a more flexible approach for implementing ZoomTransitionSourceDelegate and ZoomTransitionDestinationDelegate protocols.

    Rather than use @objc and declare the optional protocol methods explicitly it is more flexible to implement them as swift protocols with default empty implementations.

    By doing this the user can implement these protocols on either a struct or class type in Swift. Right now the user of this library is forced to use class exclusively.

    opened by Nirma 1
  • Add a Gitter chat badge to README.md

    Add a Gitter chat badge to README.md

    WorldDownTown/ZoomTransitioning now has a Chat Room on Gitter

    @WorldDownTown has just created a chat room. You can visit it here: https://gitter.im/WorldDownTown/ZoomTransitioning.

    This pull-request adds this badge to your README.md:

    Gitter

    If my aim is a little off, please let me know.

    Happy chatting.

    PS: Click here if you would prefer not to receive automatic pull-requests from Gitter in future.

    opened by gitter-badger 0
  • Manual Installation

    Manual Installation

    CocoaPods and Carthage are awesome tools and make our life really easier, but there are some devs who still don't know how to use them.

    It would be cool to add the Manual installation guide in your README.md. You can take a look at my iOS Readme Template to see how you can do it.

    opened by lfarah 0
  • Device orientation bug

    Device orientation bug

    Hi there, I've noticed that there is bug when device orientation comes into place. To reproduce the error select an image from the main view, it takes you to destination controller, then change device orientation and go back, the collection view stays in the previous orientation and do not updates. Could you advice a solution for this problem ?

    opened by felixolivares 2
Releases(1.6.0)
Owner
WorldDownTown
🍺👨‍💻🍺
WorldDownTown
ChainPageCollectionView A custom View with two level chained collection views and fancy transition animation

ChainPageCollectionView A custom View with two level chained collection views and fancy transition animation. Demo Requirements iOS 9.0+ Xcode 8 Insta

Yansong Li 775 Dec 7, 2022
Design and prototype customized UI, interaction, navigation, transition and animation for App Store ready Apps in Interface Builder with IBAnimatable.

Design and prototype customized UI, interaction, navigation, transition and animation for App Store ready Apps in Interface Builder with IBAnimatable.

IBAnimatable 8.6k Jan 2, 2023
An experiment for using SwiftUI's custom timing Animation to create an orbital-like animation.

Orbital-SwiftUI-Animation An experiment for using SwiftUI's custom timing curve to create an orbital-like animation. How it looks: How it works: Apply

Mostafa Abdellateef 7 Jan 2, 2023
Transition animation for ViewController

XTransitionKit Example To run the example project, clone the repo, and run pod install from the Example directory first. Requirements iOS 9.0+ Swift 5

Leo 2 Dec 17, 2021
Allows a swipe on any part of the screen to start an interruptible pop animation to the previous view

Lazy Pop SwiftUI Swiping on any part of the screen starts an interruptible pop animation to the previous view. Forked from https://github.com/rishi420

Joe Hinkle 150 Dec 18, 2022
Swiftui-animation-observer - Track SwiftUI animation progress and completion via callbacks

SwiftUI Animation Observer Track SwiftUI animation progress and completion via c

Gordan Glavaš 9 Nov 5, 2022
Simple Interface Core Animation. Run type-safe animation sequencially or parallelly

Simple Interface Core Animation Sica can execute various animations sequentially or parallelly. Features Animation with duration and delay parallel /

CATS Open Source Softwares 1k Nov 10, 2022
SwiftUI-Text-Animation-Library - Text animation library for SwiftUI

⚠️ This repository is under construction. SwiftUI Text Animation Library Make yo

null 28 Jan 8, 2023
`LeafTextField` is CustomTextField that contains Image and Animation.

LeafTextField Example @IBOutlet weak var textField: LeafTextField! textField.setImage(UIImage(named: "pikases"), UIImage(named: "pikases-leaf")) text

Henry Lee 5 Apr 13, 2022
An Objective-C animation library used to create floating image views.

JRMFloatingAnimation [![CI Status](http://img.shields.io/travis/Caroline Harrison/JRMFloatingAnimation.svg?style=flat)](https://travis-ci.org/Caroline

Caroline Harrison 233 Dec 28, 2022
Tinder/Bumble like user image with user details scroll animation

TinderUserProfile Tinder/Bumble like user image with user details scroll animation Add ProfileView.m,ProfileView.h class to your project. Set the clas

Souvick Ghosh 21 Jun 21, 2022
Ease is an event driven animation system that combines the observer pattern with custom spring animations as observers

Ease is an event driven animation system that combines the observer pattern with custom spring animations as observers. It's magic. Features Animate a

Robert-Hein Hooijmans 1.3k Nov 17, 2022
SwiftUI project demonstrating Custom coded confetti animation for checkout page

Confetti-Checkout SwiftUI project demonstrating Custom coded confetti animation for checkout page NOTE: CAEmitterLayer is not used but all the confett

Waseem akram 29 Sep 28, 2022
Wallet App UI with custom Animation using SwiftUI 3.0 🤪

iOS Wallet App UI Wallet App UI with custom Animation using SwiftUI 3.0 for educational purposes. Video Preview Screenshots Features SwiftUI Animation

Shameem Reza 13 Nov 14, 2022
BWMCoverView is a very easy to use advertising the carousel view, supports circular scrolling functions such as switching, asynchronous loading of images, animation, custom is very high.

BWMCoverView BWMCoverView is a very easy to use advertising the carousel view, supports circular scrolling functions such as switching, asynchronous l

Bi Weiming 31 Mar 10, 2021
SwiftUI animated image view that works on iOS and layout just as SwiftUI.Image

SwiftUI.AnimatedImage SwiftUI animated image view that works on iOS and layout just as SwiftUI.Image Screen.Recording.2021-07-31.at.02.18.33.mov Insta

Marcin Krzyzanowski 50 Oct 14, 2022
Get a remote image's size and type without downloading the full image

FastImage FastImage 2.0 is an Swift port of the Ruby project by Stephen Sykes. It's directive is to request as little data as possible (usually just t

Kyle Hickinson 64 Sep 2, 2022
Cool wave like transition between two or more UICollectionView

CKWaveCollectionViewTransition This is a cool custom transition between two or more UICollectionViewControllers with wave-like cell animation. Could b

Cezary Kopacz 1.9k Oct 4, 2022