Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 3    Views: 75

Sherry
Lost but trying
Profile
Posts: 137
Reg: Jan 05, 2013
South Africa
11,670
01/06/14 02:00 PM (11 years ago)

Solved - Bottom Tabs hiding buttons (email, refresh, back etc.) on screens e.g. Pdfs, Maps, Browser in iOS7

Last week i developed a tabbed layout app and tested it on an iOS 6 & 7 tablet. Admittedly I used BT 2.1.9 on self host so not sure if this also affects BT 3 apps on iOS7 but if it does heres a solution.. I opened a pdf doc on iOS6 device and the bar with the refresh button, email pdf button and back button was sitting exactly where it should be, just above the bottom tabs menu. I then opened the same app on an iOS7 device and the bar with the refresh, email and back buttons had vanished. I then changed my app layout to a non-tabbed layout and opened the update on iOS7 devise and the bar was visible again making me realize the tabs were hiding it. I came up with a work around to solve this issue and force the bar to move up so it sits above the tabs menu and decided to share it so if there are others having the same problem this can help. I am however a serious novice at coding so would appreciate the coding experts to check what I've done and give an updated version if necessary. If you are developing for iOS7 ONLY the fix is as simple as changing a value from -44 to -100 and not worrying too much about the rest (see below where the value is -100 thats what you must change) and its sorted if however you are developing for iOS6 & 7 then you cant just do that because ios7 will be perfect but ios6 will have the bar sitting about 1cm higher than it should on the screen so that is why i had to combine code and use IF and ELSE statements (below) Open BT_Layout in BT_viewUtilities.m and go to around line 60 (i've included some of text before and after to give context and assistance on where to make changes) //frame for tool bar (same height as nav bar at bottom of screen) +(CGRect)frameForToolBarAtOrientation:(UIViewController *)theViewController theScreenData:(BT_item *)theScreenData{ {float currentVersion = 7.0; if([[[UIDevice currentDevice] systemVersion] floatValue] >= currentVersion) { CGFloat height = UIInterfaceOrientationIsPortrait(theViewController.interfaceOrientation) ? 44 : 44; CGFloat top = theViewController.view.bounds.size.height - 100; return CGRectMake(0, top, theViewController.view.bounds.size.width, height); } else { CGFloat height = UIInterfaceOrientationIsPortrait(theViewController.interfaceOrientation) ? 44 : 44; CGFloat top = theViewController.view.bounds.size.height - 44; return CGRectMake(0, top, theViewController.view.bounds.size.width, height); } } } //frame for advertising view
 
EdReyes
Lost but trying
Profile
Posts: 574
Reg: Oct 21, 2013
location unknow...
17,640
like
01/06/14 06:37 PM (11 years ago)
Like your profile pic, would you mind sharing a screen shot. Thanks
 
Sherry
Lost but trying
Profile
Posts: 137
Reg: Jan 05, 2013
South Africa
11,670
like
01/07/14 02:37 AM (11 years ago)
Hi EdReyes :) your pic is how I felt before I submitted app to Apple - does everything work CHECK. LOL Here is a screen shot from an ipad on iOS6 & iOS7 https://www.dropbox.com/s/l949fha9ngpko0o/pic.jpg
 
EdReyes
Lost but trying
Profile
Posts: 574
Reg: Oct 21, 2013
location unknow...
17,640
like
01/07/14 03:23 AM (11 years ago)
Ah got it, the inverted tab style to flat, had the same issue.
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.