我正在尝试为iPhone创建一个可以在iPad ViewControllers中重用的Popover。
问题是如何根据父/呈现ViewController的当前大小调整弹出窗口的大小?
我们支持iPad多任务处理,视图控制器的大小也应该改变打开的弹出窗口的大小和位置。
我看过TSPopoverController和FPPopover
发布于 2015-10-16 20:14:31
请参阅iPad多任务WWDC视频。它展示了如何根据多任务期间遇到的不同大小更改来实现大小调整。
使用size类会有所帮助。
发布于 2015-10-16 20:20:35
你可以查看ipad或iphone的大小:
enum UIUserInterfaceIdiom : Int {
case Unspecified
case Phone // iPhone and iPod touch style UI
case Pad // iPad style UI
}
UIDevice.currentDevice().userInterfaceIdiom == .Pad
UIDevice.currentDevice().userInterfaceIdiom == .Phone
UIDevice.currentDevice().userInterfaceIdiom == .Unspecified您可以调整Popover的大小
https://stackoverflow.com/questions/32819427
复制相似问题