{"id":535,"date":"2014-05-19T05:44:05","date_gmt":"2014-05-19T01:44:05","guid":{"rendered":"http:\/\/www.hakbox.com\/?p=535"},"modified":"2014-05-19T07:44:52","modified_gmt":"2014-05-19T03:44:52","slug":"phonegap-and-ios-7-navigation-bar-issue","status":"publish","type":"post","link":"https:\/\/www.hakbox.com\/?p=535","title":{"rendered":"Phonegap and iOS 7 Navigation Bar Issue"},"content":{"rendered":"<p>Having an issue with your navigation bar overlapping your application web view? Add this code in your viewWillAppear method<\/p>\n<p><i>MainViewController.m<\/i><\/p>\n<pre>\r\n- (void)viewWillAppear:(BOOL)animated\r\n{\r\n\u00a0 \u00a0 \/\/ View defaults to full size.\u00a0 \r\n    \/\/ If you want to customize the view's size, \r\n    \/\/ or its subviews (e.g. webView),\r\n\u00a0 \u00a0 \/\/ you can do so here.\r\n\u00a0 \u00a0 \/\/Lower screen 20px on ios 7\r\n\u00a0 \u00a0 if ([[[UIDevicecurrentDevice] systemVersion] floatValue] >= 7) \r\n    {\r\n\u00a0 \u00a0     CGRect viewBounds = [self.webView bounds];\r\n        viewBounds.origin.y = 18;\r\n\tviewBounds.size.height = viewBounds.size.height - 18;\r\n\tself.webView.frame = viewBounds;\r\n    }\r\n\r\n    [super viewWillAppear:animated];\r\n}\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Having an issue with your navigation bar overlapping your application web view? Add this code in your viewWillAppear method MainViewController.m &#8211; (void)viewWillAppear:(BOOL)animated { \u00a0 \u00a0 \/\/ View defaults to full size.\u00a0 \/\/ If you want to customize the view&#8217;s size, \/\/ or its subviews (e.g. webView), \u00a0 \u00a0 \/\/ you can do so here. \u00a0 [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10,66,67],"tags":[],"class_list":["post-535","post","type-post","status-publish","format-standard","hentry","category-dev","category-ios-dev","category-phonegap","no-thumb"],"_links":{"self":[{"href":"https:\/\/www.hakbox.com\/index.php?rest_route=\/wp\/v2\/posts\/535","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hakbox.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hakbox.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hakbox.com\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hakbox.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=535"}],"version-history":[{"count":4,"href":"https:\/\/www.hakbox.com\/index.php?rest_route=\/wp\/v2\/posts\/535\/revisions"}],"predecessor-version":[{"id":541,"href":"https:\/\/www.hakbox.com\/index.php?rest_route=\/wp\/v2\/posts\/535\/revisions\/541"}],"wp:attachment":[{"href":"https:\/\/www.hakbox.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=535"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hakbox.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=535"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hakbox.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=535"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}