Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 4    Views: 72

MacApple
Apple Fan
Profile
Posts: 4675
Reg: Oct 25, 2010
USA
61,150
12/04/12 04:18 PM (13 years ago)

Issue on MacImage Gallery with rotation

Hi all. It has been brought to my attention that the image gallery is crashing when the device is rotated. I just got onto computer and am having a look now. Seems it is doing it on all devices and sims. I'll update this thread when I get to the bottom of it. Thanks (in advance) for your patience.
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
12/07/12 12:27 AM (13 years ago)
This has not been a confirmed fix yet but I think it's the issue. The trouble is NOT in Mac's Gallery, it's in the BT_rotatatingTabBarControlller.m file. Lines 175 - 177 are WRONG and should NOT be: //if this view controller has a property named "rotating" set it to false... if([theViewController respondsToSelector:NSSelectorFromString(@"rotating")]) { [theViewController setValue:0 forKey:@"rotating"]; } and SHOULD BE: //if this view controller has a property named "rotating" set it to false... if([theViewController respondsToSelector:NSSelectorFromString(@"setNotRotating")]) { SEL s = NSSelectorFromString(@"setNotRotating"); [theViewController performSelector:s]; } I can't actually duplicate the crash but did get some good intel from Mac's Console. I'm nearly certain this is the issue. In order to make this patch permanent...I need somebody that is experiencing the crash to apply this, verify it fixes the crash, then post. If it's good, I'll update the download server.
 
MacApple
Apple Fan
Profile
Posts: 4675
Reg: Oct 25, 2010
USA
61,150
like
12/07/12 05:44 AM (13 years ago)
That does indeed fix the issue, tested on both SIMS and device.
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
12/07/12 07:19 AM (13 years ago)
Download server update. Fixed. Note: The reason this did not crash apps while rotating on other screens is because the other screens do not have a method called setNotRotating. This line: if([theViewController respondsToSelector:NSSelectorFromString(@"setNotRotating")]) { is "Hey iOS, if the current screen has a method named "setNotRotating" then trigger it. No otehr screens have a method with that name so no other plugins would crash. Future plugins may implement this method if they so choose. They would do it if the developer needed to "learn" or "act" when the screen was rotated. 6:00 AM. Sun coming up. Nice out!
 
MacApple
Apple Fan
Profile
Posts: 4675
Reg: Oct 25, 2010
USA
61,150
like
12/07/12 07:35 AM (13 years ago)
Makes sense. Stared at it for a good while and annoyed the penny didn't drop. Thank ye kindly good sir.
 

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.