Discussion Forums  >  Uncategorized

Replies: 2    Views: 155

manga_university
Aspiring developer
Profile
Posts: 48
Reg: Jul 13, 2011
Tokyo
480
02/13/12 07:58 AM (12 years ago)

Menu buttons — scroll on iPad, not on iPhone?

I want to have the Menu Menu buttons scroll when my app is being viewed on an iPad, but not scroll when viewed on an iPhone or iPod touch. I've been tinkering with the BT_screen files in Xcode, and found this in the BT_screen_menuList.m file: //prevent scrolling? if([[BT_strings getStyleValueForScreen:self.screenData:@preventAllScrolling:@] isEqualToString:@1]){ [self.myTableView setScrollEnabled:FALSE]; } [self.view addSubview:myTableView]; Is it possible to further configure this code so the setScrollEnabled: FALSE only applies to the iPad? Thanks!
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
02/13/12 11:19 AM (12 years ago)
If it's a button screen it's in the BT_screen_menuButtons.m file. If it's a list menu, it's BT_screen_menuList.m You're on the right track. In the menu list screen it's a UITableView that should be prevented from scrolling. In the button screen it's a UIScrollView. If you want the buttons to scroll on iPhone but not on iPad, try this... a) Find the layoutScreen method in BT_screen_menuButtons.m. It starts about line 298 b) Move the very end of this method, just before it's last closing curly brace } c) Test to see if the app is running on iPhone or iPad using the built in BT method. if(![[appDelegate.rootApp rootDevice] isIPad]){ [self.myScrollView setScrollEnabled:FALSE]; } That should be prevent the scroller from scrolling in iPhone
 
manga_university
Aspiring developer
Profile
Posts: 48
Reg: Jul 13, 2011
Tokyo
480
like
02/13/12 03:21 PM (12 years ago)
Hi David, Thanks for the reply and providing the code! I actually was able to figure it out myself, and returned here to post my findings. I'm glad I was able to experiment and do some trial-and-error, but the support you offer here is always fantastic. Thanks again!
 

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.