Search code examples
iosipadrefreshuisplitviewcontrollerback-button

iPad SplitViewController leftViewController is UITableViewController and back button repaints the screen from top to bottom


I have a SplitViewController (iPad) and its leftViewController is a class inherited from UITableViewController; on the other hand, the rightViewController is a map. In landscape mode, when the leftViewController is shown (UITableViewController), then the user can tap on one item and it is pushed onto the left part of the SplitViewController another list of items (UITableViewController). As a result, it appears the title and the back button with the title of the previous list (this is the back button offered by the UITableViewController, so I have not programmed a new button to implement that behavior). During all that process the map does not change (and this is the desired behavior).

The problem is related to the back button and in landscape mode; that is, when it is pressed then the previous list is shown (and this is the desired behavior), however it seems like all the screen (the menu bar at the top and also the sliptviewcontroller -with left and rigth viewcontrollers) is refreshed (repainted) from top to bottom during less than one second.

I am quite sure that is not a problem related to animation because I have commented, in the code, all the sentences related to animation, and, I also have set to false all the function arguments like "animate:".

It is a esthetic problem, but I would like to correct it.

Thanks in advance,


Solution

  • Solution: Implement in the left view controller the following method.

    - (BOOL)shouldAutorotateToInterfaceOrientation:   (UIInterfaceOrientation)interfaceOrientation
    {
        return YES;
    }