Auto Rotate Tab Bar

Discussion in 'iOS Programming' started by amalshah71, Aug 30, 2009.

  1. amalshah71 macrumors member

    Feb 1, 2009
    All the posts i could find regarding this is related to TabBar controller based App.

    All posts talk about overriding shouldAutorotateToInterfaceOrientation:

    Though in the following case it won't apply

    Scenario :

    i have 2 components , one a UIScrollView and 2nd a UITabBar

    After initing these 2 components i add it to UIWindow

    I set a notification to listen for Orientation changes...

    Say for eg: a LandscapeRight orientation happens...

    i set bounds for UIScrollView component to set it to landscapemode...

    But how about UITabBar component...

    How do i make it to display in landscape mode


  2. robbieduncan Moderator emeritus


    Jul 24, 2002
    For my, as yet unreleased update, to DLR Times I created a subclass of UITabViewController called RotatingTabViewController in which I override shouldAutorotateToInterfaceOrientation: to return YES for all orientations and nothing else. I then changed my tab view controller to an instance of my new subclass and it all worked perfectly.
  3. amalshah71 thread starter macrumors member

    Feb 1, 2009
    to use shouldAutorotateToInterfaceOrientation: i have to use a viewcontroller...for getting rotation is using a viewcontroller the only way out

    is there any other way for tab bar component to listen for orientation changes...


Share This Page