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
Post a Comment