Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 3    Views: 79

nadthevlad
Code is Art
Profile
Posts: 1025
Reg: Jun 07, 2012
Denver
21,850
01/16/13 08:09 PM (13 years ago)

overriding BT_rotatingTabBarController

For the plugin I am working on the text and image boxes resize them selves on rotation. Its working just fine in a non tabbed layout. But in the tabbed layout the text and image boxes are not resizing. The function call to resize the boxes is [self updateViewConstraints] and is inside of the overridden function: -(void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration { // keep track of device orientation _newOrientation = toInterfaceOrientation; // call to update constraints on rotations [self updateViewConstraints]; } I am fairly certain the [self updateViewConstraints] function is not getting called in the BT_rotatingTabBarController. In non tabbed layout the console is showing this on rotation Scrollable_mc_quiz: didRotateFromInterfaceOrientation In the tabbed layout the console is showing this on rotation BT_rotatingTabBarController: didRotateFromInterfaceOrientation I figure that I have willRotateToInterFaceOrientation overriden properly for the Scrollable_mc_quiz view controller but not the BT_rotatingTabBarController. And that is where I am getting stuck. Any insights:)
 
Susan Metoxen
buzztouch Evangelist
Profile
Posts: 1706
Reg: May 01, 2011
Hopkins, Minnes...
26,260
like
01/17/13 12:04 AM (13 years ago)
Sounds really cool! Can't wait to see it on the market. Let me know if you don't find an answer on the forum, because we don't want to let this problem to delay you too long.
 
nadthevlad
Code is Art
Profile
Posts: 1025
Reg: Jun 07, 2012
Denver
21,850
like
01/17/13 10:04 AM (13 years ago)
Bingo! Got it! Had to add two methods to the BT_rotatingTabBarController.m -(BOOL)shouldAutomaticallyForwardAppearanceMethods{ // This method is called to determine whether to // automatically forward appearance-related containment // callbacks to child view controllers. return YES; } -(BOOL)shouldAutomaticallyForwardRotationMethods{ // This method is called to determine whether to // automatically forward rotation-related containment // callbacks to child view controllers. return YES; } <a href="http://stackoverflow.com/questions/13530020/ios-6-rotation-methods-not-being-called?rq=1" target="_blank" rel="nofollow">http://stackoverflow.com/questions/13530020/ios-6-rotation-methods-not-being-called?rq=1</a>
 
Susan Metoxen
buzztouch Evangelist
Profile
Posts: 1706
Reg: May 01, 2011
Hopkins, Minnes...
26,260
like
01/17/13 11:21 AM (13 years ago)
Yeah! Upload it when you are ready.
 

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.