Code Monkey home page Code Monkey logo

mhnatgeoviewcontrollertransition's Introduction

MHNatGeoViewControllerTransition

A new ViewController transition inspired by NatGeo City Guides by National Geographic

Demo

Preview

Features

Easy integration

Can be use as segue

Requirements

Requires either iOS 5.0 and above.

Usage

How to Present a ViewController

Using Storyboard Segue

Just simply drag the from Source to Destination and select nat geo Segue (see screenshots below)

Preview

Preview

Present Programmatically

Just

#import "MHNatGeoViewControllerTransition.h"

and then

[self presentNatGeoViewController:demoViewController];

or you can use the completion block,

[self presentNatGeoViewController:demoViewController completion:^(BOOL finished) {		
	NSLog(@"Present complete!");
}];

How to dismiss a ViewController

Just

#import "MHNatGeoViewControllerTransition.h"

and then

[self dismissNatGeoViewController];

or you can use the completion block,

[self dismissNatGeoViewControllerWithCompletion:^(BOOL finished) {	
	NSLog(@"Dismiss complete!");
}];

Is it Easy? :)

Please let me know if you have any questions.

Cheers,
Michael Henry Pantaleon

Twitter: @michaelhenry119

Linked in: ken119

http://www.iamkel.net

Licensing

Copyright (c) 2013 Michael Henry Pantaleon (http://www.iamkel.net). All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

mhnatgeoviewcontrollertransition's People

Contributors

michaelhenry avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mhnatgeoviewcontrollertransition's Issues

Navigation bar..disappear

I really like this Transitions!

I have a navigation controller so i usually push like this
[self.navigationController pushViewController:findSolutions animated:YES];

using your library i'am doing something like this...
[self.navigationController presentNatGeoViewController:findSolutions];
it works...but navigation bar disappear into the destination view controller... how can i solve this situation?

Suggest

Hello,
thanks for the great source, it works like a charm.
however i have a litte problem : How to gesture control transform?
Jack

Suggest

1、How to add gestures to control transform?

Crash when dismiss

The hierarchy is JASidePanelController -> FlipBoardNavigationController -> STLViewController -> STLSecondPageViewController

It will crash unless I change the window.rootViewController to STLViewController and present STLSecondPageViewController.

Thank you!

Error code:

2014-01-07 14:33:39.439 PodTesting[3203:70b] *** Terminating app due to uncaught exception 'UIViewControllerHierarchyInconsistency', reason: 'child view controller:<STLViewController: 0x10bc50100> should have parent view controller:(null) but actual parent is:<FlipBoardNavigationController: 0x10bc4eb10>'
*** First throw call stack:
(
0 CoreFoundation 0x0000000102010795 exceptionPreprocess + 165
1 libobjc.A.dylib 0x0000000101d73991 objc_exception_throw + 43
2 CoreFoundation 0x00000001020105ad +[NSException raise:format:] + 205
3 UIKit 0x0000000100e8ca1f -[UIView(Hierarchy) _associatedViewControllerForwardsAppearanceCallbacks:performHierarchyCheck:isRoot:] + 308
4 UIKit 0x0000000100e8cda3 -[UIView(Hierarchy) _willMoveToWindow:withAncestorView:] + 215
5 UIKit 0x0000000100e96e9e -[UIView(Internal) _addSubview:positioned:relativeTo:] + 407
6 PodTesting 0x000000010007a4e3 +[MHNatGeoViewControllerTransition dismissViewController:duration:completion:] + 467
7 PodTesting 0x000000010007adce -[UIViewController(MHNatGeoViewControllerTransition) dismissNatGeoViewControllerWithCompletion:] + 110
8 PodTesting 0x000000010007ae25 -[UIViewController(MHNatGeoViewControllerTransition) dismissNatGeoViewController] + 53
9 PodTesting 0x0000000100005dd1 -[STLSecondPageViewController goBack:] + 289
10 UIKit 0x0000000100e3f096 -[UIApplication sendAction:to:from:forEvent:] + 80
11 UIKit 0x0000000100e3f044 -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 17
12 UIKit 0x0000000100f13450 -[UIControl _sendActionsForEvents:withEvent:] + 203
13 UIKit 0x0000000100f129c0 -[UIControl touchesEnded:withEvent:] + 530
14 UIKit 0x0000000100e73c15 -[UIWindow _sendTouchesForEvent:] + 701
15 UIKit 0x0000000100e74633 -[UIWindow sendEvent:] + 988
16 UIKit 0x0000000100e4dfa2 -[UIApplication sendEvent:] + 211
17 UIKit 0x0000000100e3bd7f _UIApplicationHandleEventQueue + 9549
18 CoreFoundation 0x0000000101f9fec1 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION
+ 17
19 CoreFoundation 0x0000000101f9f792 __CFRunLoopDoSources0 + 242
20 CoreFoundation 0x0000000101fbb61f __CFRunLoopRun + 767
21 CoreFoundation 0x0000000101fbaf33 CFRunLoopRunSpecific + 467
22 GraphicsServices 0x0000000103ce53a0 GSEventRunModal + 161
23 UIKit 0x0000000100e3e043 UIApplicationMain + 1010
24 PodTesting 0x0000000100005e63 main + 115
25 libdyld.dylib 0x000000010269f5fd start + 1
26 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException

dismiss problem with delegate!

hi!
it's awesome!
but my problem is :
when present to a view controller & set delegate & when dismiss it it going to wrong view controller! :(

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.