views:

380

answers:

4

Hi,

I am using SplitViewController in ipad. On a button click from detail view, I open a modalview which is in full screen mode. Whenever I dismiss the modal view, the button which displays the table view in portrait mode shifts to the right.

If I continue the process of opening the modal view and dismissing it, it keeps moving to the right until it disappears to the right of the screen.

Any idea why this is happening?

A: 

I just noticed this same problem with my app. I'm baffled...

Kalen
A: 

The problem occurs when the any.modalPresentationStyle = UIModalPresentationFullScreen;

I changed it to any.modalPresentationStyle = UIModalPresentationPageSheet; and now everything is fine.

nishantcm
A: 

I was going to try that next. Thanks for the update, that fixed it.

Kalen
A: 

i confirm that changin modalPresentationStyle to UIModalPresentationPageSheet does the trick for example:

MY_VC *controller = [[MY_VC alloc] initWithNibName:@"MY_VC" bundle:nil];
[controller setModalPresentationStyle:UIModalPresentationPageSheet];
[splitViewController presentModalViewController:controller animated:NO];
Robbbberto