Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 7    Views: 66

shak77
buzztouch Evangelist
Profile
Posts: 399
Reg: Jan 18, 2011
location unknow...
7,240
08/12/13 11:41 AM (12 years ago)

Making quiz buttons smaller on iPad

Hi, I'm trying to make the quiz buttons smaller because the quiz is one of my tabs and the bottom navigation bar blocks it otherwise. I have figured out how to do this for iPhone by going to the "//frame for image is different for small / large devices" section in the BT_screen_quiz.m file, but when I adjust the sizes, it only works for iPhone and not iPad. Does anyone know how to adjust it for both? Thanks, David
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
08/12/13 02:55 PM (12 years ago)
Once you start meddling with the code, you have to differentiate 'which' device you're working on. When there is a difference in device, you can use this snippet to test for device type: BT_appDelegate *appDelegate = [[BT_appDelegate alloc]init]; //The above line 'may' not be required, if it's already present in the method. if([appDelegate.rootApp.rootDevice isIPad]){ [BT_debugger showIt:self theMessage:@"supposedly loaded an iPad xib"]; }else { if([UIScreen mainScreen].bounds.size.height == 568) { [BT_debugger showIt:self theMessage:@"supposedly loaded an iPhone5 xib"]; }else{ [BT_debugger showIt:self theMessage:@"supposedly loaded an iPhone 3/4 xib"]; } } Hope this helps! Cheers! -- Smug
 
shak77
buzztouch Evangelist
Profile
Posts: 399
Reg: Jan 18, 2011
location unknow...
7,240
like
08/12/13 03:32 PM (12 years ago)
Hi Smug, I'm sorry but I'm confused where I should be putting this code. Thanks, David
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
08/12/13 03:55 PM (12 years ago)
You'd have to look at the Quiz files; I haven't made any modifications on mine... Wherever it sizes your button elements, I suppose... In a nutshell, it would work something like this: If (device is an iPad) button size changed here for iPad else button size changed here for iPhone end if That code 'alone' won't do anything. You'll have to modify it to resize your buttons, and place it in an area where the buttons are being sized. If you haven't done this type of modification before, keep notes, and keep your original files untouched, in case you have to revert to a previous version. It will take a little playing around with. Cheers! -- Smug
 
shak77
buzztouch Evangelist
Profile
Posts: 399
Reg: Jan 18, 2011
location unknow...
7,240
like
08/12/13 05:00 PM (12 years ago)
Hi Smug, I got it! It turns out there's already an "If device is iPad" part, so I was just able to adjust things from there. Thanks! David
 
shak77
buzztouch Evangelist
Profile
Posts: 399
Reg: Jan 18, 2011
location unknow...
7,240
like
08/12/13 05:13 PM (12 years ago)
Hi Smug, One other thing- I noticed on the iPad version of my app that the status bar at the top is kind of a white/silver color whereas it's more of a blue on the iPhone. Do you know how I can make the iPad top status bar more like the iPhone one in terms of color? Thanks, David
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
08/12/13 05:42 PM (12 years ago)
You can try setting the color in the BT Control panel 'theme' page... that is 'supposed' to be a global setting... I typically change the entire image on mine, using a method provided by MGoBlue... https://dl.dropboxusercontent.com/u/115208762/Custom_Nav_Bar_Image.pdf Maybe that would work for you? Cheers! -- Smug
 
shak77
buzztouch Evangelist
Profile
Posts: 399
Reg: Jan 18, 2011
location unknow...
7,240
like
08/12/13 06:00 PM (12 years ago)
Oops didn't see it in the themes. Thanks and I'll look at that tutorial. David
 

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.