Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 4    Views: 57

Jake Chasan
Veteran developer
Profile
Posts: 1685
Reg: May 13, 2011
location unknow...
29,650
05/03/13 06:46 AM (12 years ago)

Navigation Bar Loading Wrong

Hi All, I think I figured out where my problem is in the plugin that I am developing: [BT_viewUtilities configureBackgroundAndNavBar:self theScreenData:[self screenData]]; When the user clicks the back button, the navbar stays the same, so the menu list still has the previous screen's title and back button. Any ideas? Source Code: http://jworldhosting.com/Uploads/jc_small_large_device-b1.zip Thanks, Jake
 
Kittsy
buzztouch Evangelist
Profile
Posts: 2251
Reg: Feb 22, 2012
Liverpool
31,360
like
05/03/13 07:45 AM (12 years ago)
Jake what is it you are trying to do
 
Jake Chasan
Veteran developer
Profile
Posts: 1685
Reg: May 13, 2011
location unknow...
29,650
like
05/03/13 08:15 AM (12 years ago)
I am trying to create a plugin: From the control panel, the user selects a load screen for a small device and a large device. When the code is ran, on iPad the large device screen will load, on an iPhone, the small device screen will load. This will be useful for screens where you place calls, on iPhone it could say "Call Us" on iPad it could say "Email Us". Jake
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
05/03/13 08:31 AM (12 years ago)
If that is the case, you can use two xib files, or do it programatically. Whichever way, in your 'view will appear' code, you can put this "if" statement to test for an iPad (or not). Lets say you want to have 3 xib files. 1 for the iPad, 1 for an iPhone 5, and 1 for the 3/4... yourapp_appDelegate *appDelegate = (yourapp_appDelegate *) [[UIApplication sharedApplication] delegate]; if([appDelegate.rootApp.rootDevice isIPad]){ // do the iPad dance }else { if([UIScreen mainScreen].bounds.size.height == 568) { // do the iPhone 5 dance }else{ // do the iPhone 3/4 dance } } Would that work for you? Cheers! -- Smug
 
Kittsy
buzztouch Evangelist
Profile
Posts: 2251
Reg: Feb 22, 2012
Liverpool
31,360
like
05/03/13 08:39 AM (12 years ago)
If i understand this correctly your plugin has a control panel with 2 settings iphone/ipod version and an ipad version if the screen loads on an ipad you want it to automatically load the ipad screen and vice versa instantly. The reason the navbar isn't loading as you expect is due to you putting all the info in view did load, This is why you want the back button to go back by 2 screens. other than the email, call us what other screens can you see this being beneficial for. Why not which is easy and you can see it used in a few of my projects create a new plugin that handles all share information phone, Facebook, calls, email etc and only have the ones available on that device show. You will find this quite difficult to achieve this with buzztouch the way you are going about it.
 

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.