Advertise here




Advertise here

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

swap viewcontrollers on rotation?

truehybridxtruehybridx Posts: 69Registered Users
edited April 2010 in Tutorial Requests
for the sake of being even and stuff with the layout of my screen in my app i wanted to know how to swap viewcontrollers when the device is rotated

the same functions will be in each viewcontroller if that gives any help to making this simple
Post edited by truehybridx on

Replies

  • BatmanBatman Posts: 421Registered Users
    edited April 2010
    for the sake of being even and stuff with the layout of my screen in my app i wanted to know how to swap viewcontrollers when the device is rotated

    the same functions will be in each viewcontroller if that gives any help to making this simple

    You would not create a second viewController, just delete the current view on the xib, drag two new views, then switch them when rotated. The method you want is
    - (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)
    interfaceOrientation duration:(NSTimeInterval)duration {
    
    Beginning Iphone Development 3 has a great chapter on it, if you happen to own it.
    <div align="center"><font size="5"><font color="Navy">Fast Flash Cards</font></font><br />
    <font size="3">Available on the App Store<br />
    <a href="http://itunes.apple.com/us/app/fast-flash-cards/id348872961?mt=8&quot; target="_blank">Fast Flash Cards</a></f
  • truehybridxtruehybridx Posts: 69Registered Users
    edited April 2010
    Batman wrote: »
    You would not create a second viewController, just delete the current view on the xib, drag two new views, then switch them when rotated. The method you want is
    - (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)
    interfaceOrientation duration:(NSTimeInterval)duration {
    
    Beginning Iphone Development 3 has a great chapter on it, if you happen to own it.

    ill try to find a copy of it but in the meantime can you give me a short lil example?
  • BNA!BNA! Posts: 4New Users
    Did this problem ever get solved?

    I'm stuck at the same point - what's the right way to swap view controllers on rotation and why don't they appear correctly rotated. Differences between iOS5 and iOS6?
Sign In or Register to comment.