objective c - Fail to jump from a portrait view to a landscape view -


everyone. i've got 2 views. first view supports landscape orientation , second view supports orientations. however, when second view portrait , button pressed, jumps first 1 portrait, meant landscape.

i've added following 2 method in first viewcontroller.

- (bool)shouldautorotate {         return yes; }  -(nsuinteger)supportedinterfaceorientations {     return uiinterfaceorientationmasklandscapeleft | uiinterfaceorientationmasklandscaperight; } 

i wonder if me, since issue had puzzled me long. in forward!!

i not sure whether got u correctly or not. upto got have 2 viewcontrollers, first viewcontroller supports landscape while 2nd viewcontroller supports orientations. r having problem in maintaining this. check whether have implemented in code, if u still find problem, revert , if solves kindly accept answer , vote ;) :-

1) first viewcontroller should have :- // ios 6

-(bool)shouldautorotate{     return yes; }  -(nsuinteger)supportedinterfaceorientations{     return uiinterfaceorientationmasklandscape; } 

for < ios 6

- (bool)shouldautorotatetointerfaceorientation:(uiinterfaceorientation)interfaceorientation {     return (interfaceorientation == uiinterfaceorientationlandscaperight || interfaceorientation == uiinterfaceorientationlandscapeleft);  } 

2) second viewcontroller should have this:- ios 6

-(bool)shouldautorotate{     return yes; }  -(nsuinteger)supportedinterfaceorientations{     return uiinterfaceorientationmaskportrait; } 

for < ios6

- (bool)shouldautorotatetointerfaceorientation:(uiinterfaceorientation)interfaceorientation {     return (interfaceorientation == uiinterfaceorientationportrait); } 

Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -