rotate a view with tab bar

Discussion in 'iOS Development' started by ipodgreatmaster, Mar 13, 2009.

  1. ipodgreatmaster

    ipodgreatmaster Member

    Joined:
    Feb 20, 2008
    Messages:
    186
    Likes Received:
    0
    Device:
    4G iPod touch
    im making an app and want that when he rotates the device, the view also rotates. When the app do not have a tab bar it works. But my app has a tab bar and i have tryed many things and nothing works. Is there a way to rtate the view with the tab bar include?
  2. Steaps

    Steaps New Member

    Joined:
    Oct 24, 2007
    Messages:
    5,074
    Likes Received:
    41
    Device:
    iPod touch
  3. SumDaii

    SumDaii Active Member

    Joined:
    Nov 17, 2008
    Messages:
    6,297
    Likes Received:
    0
    Device:
    iPod touch
    i think there's a fix for this soemwhere, i remember seeing it, hmmmmm
  4. Chicken

    Chicken Retired Moderator

    Joined:
    Feb 17, 2008
    Messages:
    2,494
    Likes Received:
    7
    Device:
    iPhone 5S
    look at the autoResizingSubMask property, i think thats what it's called.
  5. SkylarEC

    SkylarEC Super Moderator Emeritus Staff Member

    Joined:
    Sep 19, 2007
    Messages:
    6,642
    Likes Received:
    129
    Or, simply try reading the docs that Apple provides with their SDK.



    A UITaBBarController will not rotate unless ALL sub controllers support rotating. So, set the sub controllers to rotate, set the tab bar controller to rotate, and you'll be good as gold.

    EDIT: Don't follow the advice in that link Steaps posted. You should NEVER have to subclass a UITabBarController (or a UINavigationController). If you find that you "need" to, then you are clearly doing something wrong.
  6. NolesFans

    NolesFans New Member

    Joined:
    Sep 23, 2008
    Messages:
    404
    Likes Received:
    0
    Device:
    iPod touch
    Thanks skylar for that. I can create a fast way of doing it without subclass.
  7. ipodgreatmaster

    ipodgreatmaster Member

    Joined:
    Feb 20, 2008
    Messages:
    186
    Likes Received:
    0
    Device:
    4G iPod touch
    Thanks. I make all sub controllers rotate and now it works

Share This Page