Discussion Forums  >  Self Hosted Control Panels

Replies: 8    Views: 91

fusionsch
I hate code!
Profile
Posts: 516
Reg: Dec 28, 2010
Montreux Switze...
11,610
11/29/13 04:35 AM (11 years ago)

Allow / Prevent Rotation issue in self-hosted 3.0

This core setting is not functional in the new self-hosted server, even with messing around in Xcode project settings too. Moreover, I sometimes have sigabrt errors when rotating... An error of mine or a 3.0 bug?
 
mysps
Code is Art
Profile
Posts: 2082
Reg: May 14, 2011
Palma
33,320
like
11/29/13 05:08 AM (11 years ago)
David spoke about this in the developer webinar yesterday. Check your events page for the replay video.
 
fusionsch
I hate code!
Profile
Posts: 516
Reg: Dec 28, 2010
Montreux Switze...
11,610
like
11/29/13 06:21 AM (11 years ago)
Thanks a lot! I've checked the video, but unfortunately I'm not at this level of code understanding... (and moreover English is not my mother tongue and at moments David is speaking quite fast!) Is it something we have to fix in the code or just a transient 3.0 issue?
 
Niraj
buzztouch Evangelist
Profile
Posts: 2943
Reg: Jul 11, 2012
Cerritos
37,930
like
11/29/13 10:42 AM (11 years ago)
 
fusionsch
I hate code!
Profile
Posts: 516
Reg: Dec 28, 2010
Montreux Switze...
11,610
like
11/29/13 11:11 AM (11 years ago)
Thanks Niraj, but I'm afraid it won't help! This tip is pre-iOS7 and pre-BT3.0... The issue I have seems to be some bug in the new BT core!
 
LeonG
Apple Fan
Profile
Posts: 694
Reg: Nov 08, 2011
Hamburg
17,740
like
12/05/13 05:07 PM (11 years ago)
Kinda hardcode trial and errored myself through this If your app is with tabs this should work to have it portrait only: Go to BT_Layout/BT_tabBarController.m: Find -(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { [BT_debugger showIt:self message:[NSString stringWithFormat:@"shouldAutorotateToInterfaceOrientation %@", @""]]; Delete and replace with: - (BOOL)shouldAutorotate { return YES;} - (NSUInteger)supportedInterfaceOrientations { return UIInterfaceOrientationMaskPortrait; Find //can it rotate? if(canRotate){ return YES; }else{ return (interfaceOrientation == UIInterfaceOrientationPortrait); } //we should not get here return YES; } Delete all Should work ;-)
 
fusionsch
I hate code!
Profile
Posts: 516
Reg: Dec 28, 2010
Montreux Switze...
11,610
like
12/08/13 09:13 AM (11 years ago)
Thanks, but... 'should'... What about this part: -(void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration{ [BT_debugger showIt:self message:[NSString stringWithFormat:@"willRotateToInterfaceOrientation %@", @""]]; willRotateToInterfaceOrientation is now an undeclared identifier... I'm afraid it's slightly more complicated :-) Thanks anyway!!!
 
LeonG
Apple Fan
Profile
Posts: 694
Reg: Nov 08, 2011
Hamburg
17,740
like
12/08/13 09:20 AM (11 years ago)
It works fine, just try it and you will see!!
 
fusionsch
I hate code!
Profile
Posts: 516
Reg: Dec 28, 2010
Montreux Switze...
11,610
like
12/14/13 02:32 AM (11 years ago)
I did try! Exactly as you said! But as soon as I update the 1st bit of code and delete the 2nd, I get an 'an undeclared identifier' error in another bit of code (see above). Did I do something wrong? Anyway, I don't wish to prevent all rotations as it may be a rejection reason for Apple. In my previous universal apps (on BT and on BT 2.1.9 self-hosted), I was preventing rotations on iPhone (this is ok for Apple), but I was using a tweak to authorize only upside down rotation on iPad (ok for Apple too). Thanks for any advice or help! Cheers Jack
 

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.