Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 10    Views: 177

ridgerock
Veteran developer
Profile
Posts: 183
Reg: May 19, 2011
Louisville
1,830
02/15/17 06:51 AM (7 years ago)

Is Anyone using the CR_Menu Advanced Screen?

I am having a problem with the CR_Menu Advanced Screen. On an iphone 6/7 the menu shows the first 5 lines then you have to scroll to see any more. There is a large blank space at the bottom of the screen. Things have gone silent around here the last couple days. Am I the only one using this screen?
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
02/15/17 09:12 AM (7 years ago)
I use it, I built it into my BT4 test app, in my test it has 8 items & it's behaving normally - e.g. as expected for me. I am using the deault values for row height etc. Alan
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
02/16/17 01:22 AM (7 years ago)
@ridgerock I sent you an email the other day about this (returning yours). I think this post answers some questions I posted in that email. I'll get a look on an iPhone 6 / 7 and see what I can come up with. I haven't seen this plugin in a longtime but I'll be it uses a UIWebView to render all sorts of optional layout stuff. If this is the case the native UIWebView itself has a sub-view of UIScrollView (along with a ton of other subviews that aren't obvious)... UIWebView > UIScrollView. The UIScrollView is what holds the actual content. Because UIScrollView's can get super duper long (think loooooooong list of something, like movie listings or whatever) iOS tries to improve scrolling performance by not rendering anything that's "off the screen, below or above the fold" In some cases this works well, not so much in others. I'm not sure how this plugin is setup but I'll bet it's creating a bunch of HTML dynamically then adding it to the UIWebView (which in turn adds it to it's own UIScrollView) all at once. This would be when iOS says "wait a minute, there's not sense in rendering this below the fold content, I'll wait until the user scrolls." This of course isn't always ideal and of course changes constantly between iOS versions. Apple, always "improving things." It would help to see one of these screens in a control panel. This will save me having to re-create something. Find that email, send me the app name, screen nickname, whatever :-)
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
02/16/17 09:39 AM (7 years ago)
Oops! I re-tested after re-reading your post @ridgerock and indeed, it is not right on an iPhone 7. I had originally used my iPhone 5. Sorry.
 
ridgerock
Veteran developer
Profile
Posts: 183
Reg: May 19, 2011
Louisville
1,830
like
02/16/17 09:42 AM (7 years ago)
David......My Apologies! I completely missed your email (Apple Mail). I am digging into it now. THANK YOU! I will post any solutions we find.
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
02/17/17 04:10 AM (7 years ago)
CORRECTION A quick heads up, this plugin does NOT USE A UIWebView like I suspected. This means the issues described is not at all like I figured. It uses a native UITableView (which is good). Posting here now in case somebody starts wasting their time debugging something not related. Digging in....details when I know more.
 
ridgerock
Veteran developer
Profile
Posts: 183
Reg: May 19, 2011
Louisville
1,830
like
02/17/17 06:35 AM (7 years ago)
Thanks David!
 
WolfTimJ
buzztouch Evangelist
Profile
Posts: 810
Reg: Feb 20, 2011
Rockwall, TX
17,400
like
02/18/17 09:11 AM (7 years ago)
You will think there is no way what I'm about to say is correct but... If you don't use a launch screen file (.xib) but use static launch screens (launch image set), the issue with the menu advanced screen goes away. I have no idea why but I had this exact behavior (and an additional right sided space) with two apps, doing away with the XIB fixed it. I tried every imaginable setting in the XIB to solve it with no luck, think it's a bug. I'd be interested if you see the same result, let us know. Tim
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
02/18/17 12:14 PM (7 years ago)
Tim, I thought, it isn't 1st April, so I juat had to try! I wasn't sure what you meant about .xib files as I wasn't using them. I believe you are referring to the xcode setting "Launch Images Source" on the "General" tab for your app "Targets", which can be set to either LaunchImage (the default) or "don't use asset catalog". In my case, just as you predicted, if you set it the non default e.g. to "don't use asset catalog", the menu seems to work properly!! Only seems to be a problem on iPhone 6, 7 which have more display pixels. Digging into the code, file cr_menu_advanced.m, around line 105, shows the code testing for whether the height of the display is 568 and setting the tableheight variable accordingly. I removed: if([UIScreen mainScreen].bounds.size.height == 568) { tableHeight = 568 - imageHeight; }else{ tableHeight = 480 - imageHeight; } and replaced it with: tableHeight =[UIScreen mainScreen].bounds.size.height - imageHeight; then the problem went away. Please try this and see if it works for you. @Chris1 will update the plugin I'm sure; I'll send him an email to bring it to his attention. Cheers, Alan
 
WolfTimJ
buzztouch Evangelist
Profile
Posts: 810
Reg: Feb 20, 2011
Rockwall, TX
17,400
like
02/18/17 02:49 PM (7 years ago)
Good one Alan
 
WolfTimJ
buzztouch Evangelist
Profile
Posts: 810
Reg: Feb 20, 2011
Rockwall, TX
17,400
like
02/20/17 10:12 AM (7 years ago)
Worked for the height. Good one. I still had a table width issue. Changed line 164 of cr.menu.advanced.m: Old: [self.myTableView setFrame:CGRectMake(0, imageHeight + theTop, imageWidth, tableHeight)]; New: [self.myTableView setFrame:CGRectMake(0, imageHeight + theTop, self.deviceWidth, tableHeight)];
 

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.