Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 17    Views: 107

armacfan
Apple Fan
Profile
Posts: 157
Reg: Sep 05, 2011
location unknow...
3,520
01/04/13 09:52 AM (13 years ago)

Stuck for days : navbar

Hey guys I posted a similar question a week ago but did not get a solution to it and would really like for someone to provide a breakthrough. I need to create a few Custom URL or Custom HTML screens in my app that consist of a background image and audio playing behind. JUST that. The problem is that I do not want my tab bar with all the audio controls to come in the way of the image, I want the tab bar to be completely excluded. Is there anyway I could enter code in the bt_screen_customHTML.m and .h files or in the bt_screen_customURL.m and .h screen to hide the tab bar from any screen of that type. I cannot edit JSON on the CP because I don't have the JSON snippet plugin and so need a workaround. And another problem is that the audio doesn't stop on screen exit in the html and url screens , is there anything i can type into those screens in my xcode project. I hope I am clear enough. Thank you Really need help..
 
Kittsy
buzztouch Evangelist
Profile
Posts: 2251
Reg: Feb 22, 2012
Liverpool
31,360
like
01/04/13 10:27 AM (13 years ago)
I must first apologise for how long this took, I was meant to have a look when you first posted. If you do not want that tab bar to appear on any of these screens comment out these lines in customURL //get the bottom toolbar (utility may return nil depending on this screens data) //browserToolBar = [BT_viewUtilities getWebToolBarForScreen:self:[self screenData]]; //if(browserToolBar != nil){ // browserToolBar.tag = 49; // browserHeight = (browserHeight - 44); //} line 82 - 87 It works in my quick test. Kittsy
 
Kittsy
buzztouch Evangelist
Profile
Posts: 2251
Reg: Feb 22, 2012
Liverpool
31,360
like
01/04/13 10:31 AM (13 years ago)
Make sure you set the option for stop music when back pressed or you will never get it turned off. The lines for customHTML are 101 - 106 Let me know if it works
 
armacfan
Apple Fan
Profile
Posts: 157
Reg: Sep 05, 2011
location unknow...
3,520
like
01/04/13 10:39 AM (13 years ago)
Sorry for the dumb question but when you say uncomment, what exactly am i supposed to do, and if you can, please also help me on the audio stop problem. Thank you
 
Kittsy
buzztouch Evangelist
Profile
Posts: 2251
Reg: Feb 22, 2012
Liverpool
31,360
like
01/04/13 10:44 AM (13 years ago)
Make this //get the bottom toolbar (utility may return nil depending on this screens data) browserToolBar = [BT_viewUtilities getWebToolBarForScreen:self:[self screenData]]; if(browserToolBar != nil){ browserToolBar.tag = 49; browserHeight = (browserHeight - 44); } Look like this //get the bottom toolbar (utility may return nil depending on this screens data) //browserToolBar = [BT_viewUtilities getWebToolBarForScreen:self:[self screenData]]; //if(browserToolBar != nil){ // browserToolBar.tag = 49; // browserHeight = (browserHeight - 44); //} the double // makes the line of code a comment/plain unused text you could delete it but it's alot easier to put back by removing the // than typing the code again. Quick to for mass commenting out Highlight all of the text. then pressing the cmd key press /
 
armacfan
Apple Fan
Profile
Posts: 157
Reg: Sep 05, 2011
location unknow...
3,520
like
01/04/13 10:55 AM (13 years ago)
Thank you so much!! I have set it to stop music when you press back but it doesn't stop, that is why I wanted to know if there was anyway I could do it in my project
 
Kittsy
buzztouch Evangelist
Profile
Posts: 2251
Reg: Feb 22, 2012
Liverpool
31,360
like
01/04/13 11:12 AM (13 years ago)
You've found a bug. hold the line lol
 
armacfan
Apple Fan
Profile
Posts: 157
Reg: Sep 05, 2011
location unknow...
3,520
like
01/04/13 11:17 AM (13 years ago)
Haha, sure, let's hope it can be resolved soon. Thank you.
 
Kittsy
buzztouch Evangelist
Profile
Posts: 2251
Reg: Feb 22, 2012
Liverpool
31,360
like
01/04/13 11:33 AM (13 years ago)
are you self hosted?
 
Kittsy
buzztouch Evangelist
Profile
Posts: 2251
Reg: Feb 22, 2012
Liverpool
31,360
like
01/04/13 11:41 AM (13 years ago)
David has just spotted the error on a forum. He will correct the error and it will work soon. Hopefully you can hang fire, it has nothing to do with the code change we made above.
 
Kittsy
buzztouch Evangelist
Profile
Posts: 2251
Reg: Feb 22, 2012
Liverpool
31,360
like
01/04/13 11:59 AM (13 years ago)
Here is a hack if your not self hosted Add the line [appDelegate.audioPlayer stopAudio]; in BT_viewController.m line 85 to 100 //left button -(void)navLeftTap{ [BT_debugger showIt:self:@"navLeftTap"]; //child apps are handled different... yourApp_appDelegate *appDelegate = (yourApp_appDelegate *)[[UIApplication sharedApplication] delegate]; [appDelegate.audioPlayer stopAudio]; //add this line here if([appDelegate.rootApp isChildApp]){ [BT_viewControllerManager closeChildApp]; }else{ //handle "left" transition [BT_viewControllerManager handleLeftButton:screenData]; } } This basically says everytime the back button is pressed we stop the audio. I'm guessing this app never has constant audio running, so this will work for now. When the plugin is updated you just remove that line
 
ianJamesPiano
Code is Art
Profile
Posts: 2661
Reg: Feb 13, 2011
Palm Springs, C...
37,010
like
01/04/13 12:23 PM (13 years ago)
Hey guys, Back button properties are fixed now for BT and Self hosted:) Ian
 
Kittsy
buzztouch Evangelist
Profile
Posts: 2251
Reg: Feb 22, 2012
Liverpool
31,360
like
01/04/13 12:25 PM (13 years ago)
I fixed it first ha ha. The power of json errors. Thanks Ian. As I said in the plugin post if it don't break we'll never learn to fix it
 
armacfan
Apple Fan
Profile
Posts: 157
Reg: Sep 05, 2011
location unknow...
3,520
like
01/04/13 01:42 PM (13 years ago)
Thank you so much and just for the record, I'm not self hosted. Lol.
 
Kittsy
buzztouch Evangelist
Profile
Posts: 2251
Reg: Feb 22, 2012
Liverpool
31,360
like
01/04/13 01:43 PM (13 years ago)
Laughing as long as your problem is solved
 
ianJamesPiano
Code is Art
Profile
Posts: 2661
Reg: Feb 13, 2011
Palm Springs, C...
37,010
like
01/04/13 03:03 PM (13 years ago)
Ha! Yeah I like diggin around the code. Great stuff, love your work Kittsy:) Ian
 
Kittsy
buzztouch Evangelist
Profile
Posts: 2251
Reg: Feb 22, 2012
Liverpool
31,360
like
01/04/13 03:41 PM (13 years ago)
Cheers mate I would actually say probably your Scringo tutorial started my obsession with making3rd party SDKs work with buzztouch
 
ianJamesPiano
Code is Art
Profile
Posts: 2661
Reg: Feb 13, 2011
Palm Springs, C...
37,010
like
01/04/13 03:46 PM (13 years ago)
Well then I'm honored:) Cheers! Ian
 

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.