Giter Site home page Giter Site logo

mohsinalimat / zoominteractivetransition Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dentelezhkin/zoominteractivetransition

1.0 2.0 0.0 2.34 MB

Simple zoom transition using iOS 7 Custom View Controller Transitions API

License: MIT License

Ruby 2.58% Objective-C 97.42%

zoominteractivetransition's Introduction

CocoaPod platform   CocoaPod version   Packagist

ZoomInteractiveTransition

Simple zoom transition, inspired by iOS 7 Photos.app. Example:

Project status

This project is a showcase of what's possible rather than completely ready drop-in framework. If you are looking for more full-fledged and actively developed solution, I suggest looking at Hero.

Usage

1. Create ZoomInteractiveTransition instance and pass your UINavigationController to constructor.

self.transition = [[ZoomInteractiveTransition alloc] initWithNavigationController:self.navigationController];

2. Adopt ZoomTransitionProtocol by both source and destination view controllers and implement a single method

-(UIView *)viewForZoomTransition:(BOOL)isSource
{
  return <view for zooming>;
}

And that's it! All frame calculation and animations are performed automatically. ZoomInteractiveTransition creates a snapshot of source and destination view, chooses bigger one, and uses this snapshot to animate between source and destination view.

Requirements

  • iOS 7
  • ARC

Customization

Available customizations:

  • Duration
  • Animation curve
  • Interactive pop back gesture
  • Initial snapshot
  • Completion block

Additionally, you can plug in your own keyframe animations, that will run alongside interactive transition. These can be supplied via optional method animationBlockForZoomTransition.

Example

Example with cats is provided in ZoomTransitionExample folder.

Note: PlaceKit.framework, that is used in Example project, requires ssh key to clone it's repository, so you may need to add Github SSH key on your local machine to be able to install example project. Instructions.

zoominteractivetransition's People

Contributors

dentelezhkin avatar cocoabob avatar mluedke2 avatar hlfcoding avatar

Stargazers

MohsinAli avatar

Watchers

MohsinAli avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.