Skip to content

Instantly share code, notes, and snippets.

@swarut
Created October 8, 2012 17:29
Show Gist options
  • Save swarut/3853767 to your computer and use it in GitHub Desktop.
Save swarut/3853767 to your computer and use it in GitHub Desktop.
Objective-C : Custom non-animated segue #objective-c #segue #customsegue
@implementation NonAnimatedSegue
- (id) initWithIdentifier:(NSString *)identifier source:(UIViewController *)source destination:(UIViewController *)destination{
self = [super initWithIdentifier:identifier source:source destination:destination];
if(self){
}
return self;
}
- (void) perform{
[[[self sourceViewController] navigationController] pushViewController:[self destinationViewController] animated:NO];
// This doesn't work
// [[self sourceViewController] presentViewController:[self destinationViewController]
// animated:NO completion:nil];
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment