GithubHelp home page GithubHelp logo

balenan / dainavigationtransition Goto Github PK

View Code? Open in Web Editor NEW

This project forked from daidoujichen/dainavigationtransition

0.0 2.0 0.0 297 KB

Idea from http://nonomori.farbox.com/post/ios-7-jiao-hu-shi-guo-du, and convert this transition effect more easier to use.You can use this effect on ios6 !!

Objective-C 100.00%

dainavigationtransition's Introduction

DaiNavigationTransition

Idea from http://nonomori.farbox.com/post/ios-7-jiao-hu-shi-guo-du, and convert this transition effect more easier to use.

image image

DaidoujiChen

[email protected]

總覽

這個想法起源于上面的那個網站, 但是如大家所見的, 網站中實現的方法需要額外的添加許多東西, 實作起來並不是這麼的直覺, 因此將這個想法轉化為較為簡單的實現方式, 總之也是懶惰下的成果.

支援

  • ARC only
  • ios6 / ios7 (io6 要繞好遠...才可以做到跟 7 一樣的效果)

簡易使用

ok, 非常的簡單, 首先

#import "UINavigationController+Transition.h"

將這個檔案 import 到你想使用這個效果的地方, 然後, push view 時改變為 call

[self.navigationController pushViewController:[SecondViewController new]
                                     fromView:^UIView *(UIViewController *viewcontroller) {
                                         MainViewController *main = (MainViewController*) viewcontroller;
                                         DefaultTableViewCell *cell = (DefaultTableViewCell*) [main.demoTableView cellForRowAtIndexPath:[main.demoTableView indexPathForSelectedRow]];
                                         return cell.redView;
                                     }
                                       toView:^UIView *(UIViewController *viewcontroller) {
                                           SecondViewController *second = (SecondViewController*) viewcontroller;
                                           return second.redView;
                                       }];

其中, fromView 為原先從哪個 view 開始, toView 為切換至下一個 controller 之後會變成哪個 view, 就這樣.

dainavigationtransition's People

Contributors

daidoujichen avatar

Watchers

James Cloos avatar Benny Nan 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.