Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 17    Views: 127

Louie
Code is Art
Profile
Posts: 40
Reg: Dec 31, 2012
Toronto
400
01/03/14 10:16 AM (11 years ago)

Action bar/ back button

The Action bar that contains the back button has disappeared in iOS 7 (see screenshot). I searched the forum but all the solutions posted don't work. Any help to solve this will appreciated. Screenshot: https://dl.dropboxusercontent.com/u/96353953/screenshot_missing.png
 
chadh0130
Apple Fan
Profile
Posts: 352
Reg: Nov 05, 2011
Rhode Island
4,020
like
01/03/14 02:55 PM (11 years ago)
google a back button...download the image, save the image as "prev.png", put that image into the BT_art folder inside GUI and it will work.. I had the same problem and that solution worked for me.
 
Louie
Code is Art
Profile
Posts: 40
Reg: Dec 31, 2012
Toronto
400
like
01/04/14 10:33 AM (11 years ago)
Thanks for the suggestion, but it didn't work. I downloaded the image, renamed it & resized it to 26x26 px and put it in the gui folder but still nothing showed. So again my question is how to get the action bar back in ios 7?
 
fusionsch
I hate code!
Profile
Posts: 516
Reg: Dec 28, 2010
Montreux Switze...
11,610
like
01/04/14 10:57 AM (11 years ago)
It worked for me! But I copied a readymade prev.png from an old app project. Check if the file you found is really a PNG and don't forget to drag the file into the GUI of your Xcode project! Just putting it in the 'real' GUI folder is not enough, as with any file. Xcode needs to be 'informed' of the existence of the file to reference it in your project.
 
Louie
Code is Art
Profile
Posts: 40
Reg: Dec 31, 2012
Toronto
400
like
01/04/14 11:18 AM (11 years ago)
Sorry but maybe I should've explained my problem better. On my app I have bottom tabs, one of them loads a Custom URL page (wordpress posts page) and when I click one of the posts another page opens up. In ios 6 the action bar with back button appears and I can go back to the main posts page but not in ios 7.
 
Sherry
Lost but trying
Profile
Posts: 137
Reg: Jan 05, 2013
South Africa
11,670
like
01/04/14 11:49 AM (11 years ago)
I had the same problem this week with a tabbed app in ios7 the bar is actually there but it's hidden behind the tabs at the bottom so if you change your app to a non-tab app it will appear but as with me I wanted the tabbed menu at the bottom so the way I worked around it was I made some adjustments to the settings in xcode which made iOS7 work but messed with ios6 and caused the bar to sit way to high but came up with another solution. I'll try find what I did and post it shortly.
 
Sherry
Lost but trying
Profile
Posts: 137
Reg: Jan 05, 2013
South Africa
11,670
like
01/04/14 12:01 PM (11 years ago)
I'm kind of feeling my way around with coding so not sure if there is a better solution or way of doing this, if there is can the coding guru's please give Louie a better solution but here is what I did. around line 60 on BT_Layout in BT_viewUtilities.m I tweaked the code with the text below. The reason I included the float current version =7.0 bit was because I was creating an ios6.1 and ios7 app and as I mentioned changing -44 to -100 (see below) was great for ios7 but caused bar to sit way to high on ios6.1 so if you're just creating for ios7 then I'd just change the part where you see -100 below and not bother with the rest. //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
 
fusionsch
I hate code!
Profile
Posts: 516
Reg: Dec 28, 2010
Montreux Switze...
11,610
like
01/04/14 12:06 PM (11 years ago)
@Louie: don't be sorry, you described perfectly your problem. Mine was with Custom URL too, loaded from a tab too! In addition to what I posted above, try one more thing after adding the prev.png file: delete your Custom URL screen and create a brand new one. And check the settings of the screen: under 'Document Behavior', set 'Show Browser Back Button' to 'Yes'.
 
Louie
Code is Art
Profile
Posts: 40
Reg: Dec 31, 2012
Toronto
400
like
01/04/14 01:07 PM (11 years ago)
Thank you all for your help. Sherry your code did the trick, I tried it in both os 6 & 7 (iphone & ipad) and 64 bit simulator and it worked with no problem. Thank you
 
Sherry
Lost but trying
Profile
Posts: 137
Reg: Jan 05, 2013
South Africa
11,670
like
01/04/14 03:14 PM (11 years ago)
Yay :-) I discovered this flaw on Monday trying to prepare my app for submission to store, having the email pdf button on that bar was make or break for my app and with no other solutions on the forum i tried to piece different bits of code together to make it work so that's why i said there might be a slicker more efficient way to write this code but hey it solved my issue and now yours. GREAT.
 
Louie
Code is Art
Profile
Posts: 40
Reg: Dec 31, 2012
Toronto
400
like
01/04/14 03:41 PM (11 years ago)
Excellent work. This solution should be added to the "How To's" section.
 
Niraj
buzztouch Evangelist
Profile
Posts: 2943
Reg: Jul 11, 2012
Cerritos
37,930
like
01/05/14 01:28 AM (11 years ago)
Nice detective work, Sherry! :-) Does this also solve the buttons that were hidden for Maps and for MacImage Gallery for some of the users? -- Niraj
 
Sherry
Lost but trying
Profile
Posts: 137
Reg: Jan 05, 2013
South Africa
11,670
like
01/05/14 04:59 AM (11 years ago)
Hi Niraj I had a quick look at maps on my app and yes looks like it does solve it, I haven't used MacImage gallery but in theory it probably will. The quickest way to test, is change your app from tabbed layout to non-tabbed and if the bar appears on different plugin screens then yes this will work because the bar is there but its just getting hidden behind the tab menu and by changing the value from -44 to -100 you push it above the tab menu and it becomes visible. I tried other numbers like -99 and -101 but -100 just looked right.
 
Niraj
buzztouch Evangelist
Profile
Posts: 2943
Reg: Jul 11, 2012
Cerritos
37,930
like
01/05/14 11:10 AM (11 years ago)
Hello Sherry, Excellent news, can you spread the gospel far and wide by posting the solution as a new post titled "Solved - Tabs were hiding buttons for Maps, Browser, Image Gallery". If a "better" approach appears, then a follow-up comment can be put onto that Solved post. Also, put a pointer to that Solved post into these: https://www.buzztouch.com/forum/thread.php?tid=D338F2E753F112233012AD7 https://www.buzztouch.com/forum/thread.php?tid=28CED78BDDF83A2F0F1E03D Thank you! -- Niraj
 
Louie
Code is Art
Profile
Posts: 40
Reg: Dec 31, 2012
Toronto
400
like
01/06/14 01:50 PM (11 years ago)
Sherry, I found a problem with this code after further testing. With the "Interactive quiz" plugin, for some reason it added a white bar on the screen and I can't see all the questions for the quiz. Changing "theViewController.view.bounds.size.height" will change it for all screens and we don't want that. Do you know how to make the background for the actionbar "transparent" or removing it from the quiz screen altogether.
 
Sherry
Lost but trying
Profile
Posts: 137
Reg: Jan 05, 2013
South Africa
11,670
like
01/08/14 08:44 AM (11 years ago)
Hi Louie I am not sure but my gut feel would be to change a value in the plugin's .m file i'd look for something in the code that would cause the questions to not go below a certain value so just as my code pushed the bar up from -44 to -100 to sit higher on the screen you want the questions to not go below a certain xyz value. I haven't used this plugin so unfortunately don't know what you'd change or where.
 
Louie
Code is Art
Profile
Posts: 40
Reg: Dec 31, 2012
Toronto
400
like
01/08/14 09:31 AM (11 years ago)
Sherry, I found another post with similar question written 3 weeks ago: https://www.buzztouch.com/forum/thread.php?tid=5886B07E55A4718289113B8&command=isSearching&currentPage=1&topicTitle=Interactive%20quiz&createdBy=&repliedBy=&minViews=-1&maxViews=-1&minReplies=-1&maxReplies=-1&forumCategory= So it's not your code. I already tried to change the values in that file but it didn't work. I guess we have to wait for the plugin author to fix it. Thanks
 
Niraj
buzztouch Evangelist
Profile
Posts: 2943
Reg: Jul 11, 2012
Cerritos
37,930
like
05/16/14 05:38 PM (11 years ago)
Nice investigative work! :-)
 

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.