-
-
Save danielphillips/5682765 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@interface SomeViewController : UIViewController | |
@end | |
@implementation SomeViewController | |
- (IBAction)show:(id)sender | |
{ | |
UIImagePickerController *pickerController = [UIImagePickerController new]; | |
[pickerController setDelegate:(id)self]; | |
[self presentViewController:pickerController animated:YES completion:nil]; | |
} | |
#pragma mark image picker hacks | |
- (void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated | |
{ | |
if(![navigationController isKindOfClass:[UIImagePickerController class]]) | |
return; | |
UINavigationItem *item = [viewController navigationItem]; | |
if(!item.rightBarButtonItems){ | |
[item setValue:nil forKey:@"_customRightViews"]; | |
}else{ | |
[item setRightBarButtonItems:nil]; | |
} | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment