views:

5

answers:

1

Hi.

I'm having trouble showing an UISplitViewController programatically.

I have two views, an UIView with buttons which when are pressed load's my own custom RootViewController and DetailViewControllers into SplitViewController and hides the menuSubview for showing UISplitViewController.

Well, it works well in portratits orientation, but when the view is shown barButtonItem associated with the popOverViewController is not shown. After if I change orientation to landscape, and portrait again, the button appears.

Why is this happends? Is there any way to solve that?

I have a little idea. When splitviewController.view is added to window, root and detail view controllers are not set yet so it could be that the cause?

Thanks in advance!

A: 

Well at last I solved the error.

Instead adding two subviews and show/hide them, I add my splitViewController.view as principal to the window and presented the menuViewController as modal, so this issue was solved.

Rotten