[英]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? 有什么方法可以检查ViewController内部是否以弹出窗口或全屏显示?
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! 但有时无法正常工作,希望有更好的解决方案谢谢!
You can implement the below delegate(for popover) in your view and check if this is getting called for a popover or a view. 您可以在视图中实现以下委托(用于popover),并检查是否正在为popover或view调用该委托。 Should be a work around I guess.
我猜应该是可以解决的。
- (CGSize)contentSizeForViewInPopoverView ;
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.