Rotate iPad Application

Discussion in 'iPad Development' started by rtr_18, Aug 14, 2012.

  1. rtr_18
    Offline

    rtr_18 iPF Noob

    Joined:
    Aug 14, 2012
    Messages:
    1
    Thanks Received:
    0
    Trophy Points:
    0
    Location:
    Chennai
    Ratings:
    +0 / 0
    Hi!
    I want my app to rotate, when the iPad is flipped. For this I've overridden the following method:

    Code:
    - ([COLOR=#b933a1]BOOL[/COLOR]) shouldAutorotateToInterfaceOrientation:([COLOR=#7041a7]UIInterfaceOrientation[/COLOR])toInterfaceOrientation
    {
    [COLOR=#3d227f][COLOR=#b933a1]self[/COLOR][COLOR=#000000].[/COLOR][COLOR=#7041a7]tableView[/COLOR][COLOR=#000000].[/COLOR][COLOR=#7041a7]autoresizingMask[/COLOR][COLOR=#000000] = [/COLOR]UIViewAutoresizingFlexibleWidth[COLOR=#000000] | [/COLOR]UIViewAutoresizingFlexibleHeight[COLOR=#000000];[/COLOR][/COLOR]
    [COLOR=#b933a1]returnYES[COLOR=#000000];[/COLOR][/COLOR]
    }
    
    My view controller class is derived from UITableViewController. I've added the first line in the above method
    according to some site over the net. But it's not working. What to do to rotate an app when the iPad is flipped?
    Sorry if it's too simple thing. I'm very much new to iOS development.

Share This Page

Search tags for this page

uiviewautoresizingflexiblewidth rotate ipad