Auto Rotate Tab Bar

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

  1. amalshah71 macrumors member

    Joined:
    Feb 1, 2009
    #1
    Hello,
    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

    Thanks

    amal
     
  2. robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #2
    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

    Joined:
    Feb 1, 2009
    #3
    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...

    amal
     

Share This Page