Geri Borbás
Geri Borbás

Reputation: 16588

How to present modal view from UIPopoverController?

I have this:

enter image description here

And have this, when presenting modally:

enter image description here

Some code jsut before presenting webview:

webViewController.modalInPopover = YES;
webViewController.modalPresentationStyle = UIModalTransitionStyleCoverVertical;

And have this in webViewController's viewDidLoad template:

self.contentSizeForViewInPopover = CGSizeMake(320.0, 436.0);

I've looked for every frame of every role playing view, but frame.sizes are correct. Anybody with similar experience with a solution for that?

Upvotes: 0

Views: 1001

Answers (1)

Geri Borbás
Geri Borbás

Reputation: 16588

First I assigned a transistion style to presentation style. And that was the enum for fullscreen.

Having this in webViewController init...

self.modalTransitionStyle = UIModalTransitionStyleCoverVertical;
self.modalPresentationStyle = UIModalPresentationCurrentContext;

...solved the problem.

I'll try to move it to -(void)awakeFromNib; to get rid of hardcoded size.

Upvotes: 1

Related Questions