Oleg
Oleg

Reputation: 3014

Check whether View is shown in Popover or in full-screen

Is there any way to check inside ViewController if it is shown in popover or in full-screen?

I tried to get and compare

self.view.frame.size.width

but sometimes it doesn't work properly, I hope there is better solution Thanks!

Upvotes: 2

Views: 1353

Answers (1)

cocoakomali
cocoakomali

Reputation: 1356

You can implement the below delegate(for popover) in your view and check if this is getting called for a popover or a view. Should be a work around I guess.

- (CGSize)contentSizeForViewInPopoverView ;

Upvotes: 4

Related Questions