Best way to handle switching ViewControllers with Rotation, iOS -


my current view portrait, displaying particular design. when rotate landscape wise, want switch new design, , in particular new viewcontroller, new .h/.m files.

should approaching way? can point me in right direction? can rotation trigger segue?

-(void) willrotatetointerfaceorientation:(uiinterfaceorientation)tointerfaceorientation duration:(nstimeinterval)duration { if (tointerfaceorientation == uiinterfaceorientationlandscapeleft) {     nslog(@"landscape left");    //present or dismiss new view controller accordingly  } else if (tointerfaceorientation == uiinterfaceorientationlandscaperight) {     nslog(@"landscape right");     //present or dismiss new view controller accordingly  } else if (tointerfaceorientation == uiinterfaceorientationportrait) {     nslog(@"portrait");    //present or dismiss new view controller accordingly   } else if (tointerfaceorientation == uiinterfaceorientationportraitupsidedown) {     nslog(@"upside down");    //present or dismiss new view controller accordingly   } } 

Comments

Popular posts from this blog

java - How to specify maven bin in eclipse maven plugin? -

Error while updating a record in APEX screen -

single sign on - Logging into Plone site with credentials passed through HTTP -