{"id":64,"date":"2013-10-10T06:16:36","date_gmt":"2013-10-09T20:16:36","guid":{"rendered":"https:\/\/www.neuralglue.com\/?p=64"},"modified":"2013-10-10T06:16:36","modified_gmt":"2013-10-09T20:16:36","slug":"hiding-the-status-bar-for-uiimagepickercontroller","status":"publish","type":"post","link":"https:\/\/www.neuralglue.com\/?p=64","title":{"rendered":"Hiding the status bar for UIImagePickerController"},"content":{"rendered":"<p>The stock UIImagePickerController&#8217;s editing controls are under the status bar and therefore somewhat useless. Use the following category to hide the status bar:<br \/>\n<code><br \/>\n#import \"UIImagePickerController+RemoveStatusBar.h\"<\/code><\/p>\n<p>@implementation UIImagePickerController (RemoveStatusBar)<\/p>\n<p>&#8211; (void)viewDidLoad<\/p>\n<p>{<br \/>\n[super viewDidLoad];<\/p>\n<p>if (floor(NSFoundationVersionNumber) &gt; NSFoundationVersionNumber_iOS_6_1) \u00c2\u00a0 \/\/ iOS7+ only<\/p>\n<p>{<\/p>\n<p>self.edgesForExtendedLayout = UIRectEdgeNone;<\/p>\n<p>[self prefersStatusBarHidden];<\/p>\n<p>[self performSelector:@selector(setNeedsStatusBarAppearanceUpdate)];<\/p>\n<p>}<\/p>\n<p>}<\/p>\n<p>&#8211; (BOOL)prefersStatusBarHidden<\/p>\n<p>{<\/p>\n<p>return YES;<\/p>\n<p>}<\/p>\n<p>&#8211; (UIViewController *)childViewControllerForStatusBarHidden<\/p>\n<p>{<\/p>\n<p>return nil;<\/p>\n<p>}<\/p>\n<p>@end<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The stock UIImagePickerController&#8217;s editing controls are under the status bar and therefore [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[21],"tags":[],"_links":{"self":[{"href":"https:\/\/www.neuralglue.com\/index.php?rest_route=\/wp\/v2\/posts\/64"}],"collection":[{"href":"https:\/\/www.neuralglue.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.neuralglue.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.neuralglue.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.neuralglue.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=64"}],"version-history":[{"count":4,"href":"https:\/\/www.neuralglue.com\/index.php?rest_route=\/wp\/v2\/posts\/64\/revisions"}],"predecessor-version":[{"id":68,"href":"https:\/\/www.neuralglue.com\/index.php?rest_route=\/wp\/v2\/posts\/64\/revisions\/68"}],"wp:attachment":[{"href":"https:\/\/www.neuralglue.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=64"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.neuralglue.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=64"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.neuralglue.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=64"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}