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

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -