Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set navigationcontroller push animation to "No" while using storyboard

I am using storyboard for a navigation based iphone application. I want viewcontrollers to navigate using "pushviewcontroller" property but at the same time I dont want them to animate. Simply I want to set their Animation property to "NO"

How can I do this using storyboard?

like image 535
N C Avatar asked Jul 05 '12 02:07

N C


1 Answers

To expand on the answer by @azethoth creating a no animation segue is as easy as:

@interface NoAnimationSegue : UIStoryboardSegue
@end

@implementation NoAnimationSegue    
- (void)perform
{
    [[self.sourceViewController navigationController] pushViewController:self.destinationViewController animated:NO];
}    
@end
like image 53
Ben Flynn Avatar answered Oct 23 '22 20:10

Ben Flynn