iphone - Strange iOS6 AutoRotate Bug -


i'm using category supporting auto rotation in ios 6

@implementation uinavigationcontroller (rotationin_ios6)  -(bool)shouldautorotate {     nslog(@"last object %@",[[self.viewcontrollers lastobject] description]);     return [[self.viewcontrollers lastobject] shouldautorotate]; }  -(nsuinteger)supportedinterfaceorientations {     return [[self.viewcontrollers lastobject] supportedinterfaceorientations]; }  - (uiinterfaceorientation)preferredinterfaceorientationforpresentation {     return [[self.viewcontrollers lastobject]  preferredinterfaceorientationforpresentation]; } 

my application setup this

  1. show password screen navigation controller rotation works fine both(simulator,device).
  2. authenticate user , show home screen rotation works in simulator not in device

-(bool)shouldautorotate

is implemented in home screen knows how solve ?

according answer this question using category override method in cocoa class bad idea. 'the behavior undefined method implementation used @ runtime'.

i use subclass of uinavigationcontroller achieve trying , haven't had problems suggest try instead.


Comments

Popular posts from this blog

c# - Operator '==' incompatible with operand types 'Guid' and 'Guid' using DynamicExpression.ParseLambda<T, bool> -