UIPopoverController,如何改变它的大小?
我的分割视图应用程序中有UIPopoverController,我只需要让弹出窗口更长一些。 在 DetatilViewController 的 viewDidLoad 中,我输入:
self.popoverController.popoverContentSize=CGSizeMake(320, 1400);
什么都没有发生(我应该什么时候放这个?谢谢
完成了 ^^^ 我怎样才能设置 Popover 的背景?谢谢
I've got UIPopoverController in my Split-View application, I just need to make popover longer.
In viewDidLoad of DetatilViewController I put:
self.popoverController.popoverContentSize=CGSizeMake(320, 1400);
Nothing happens( when should I put this? thanks
Done with that ^^^ How can I set background for Popover? thaanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
如果你想设置
UIPopoverController
的内容大小,试试这个,祝你好运。
if u want to set the content size of the
UIPopoverController
try this,good luck..
从 iOS 7 开始:
From iOS 7:
设置
UIPopOverController
的contentSizeForViewInPopover
属性Set
contentSizeForViewInPopover
property ofUIPopOverController
这适用于 iOS 8,但会崩溃或对较低版本没有影响
希望答案:)
This works on iOS 8 but will crash or have no effect on lesser versions
Hope the answer :)
尝试在视图控制器中覆盖
-(CGSize)contentSizeForViewInPopover
,并返回您希望视图控制器的大小。Try overriding
-(CGSize)contentSizeForViewInPopover
in your view controller, and return the size you want your view controller to be.