简体   繁体   中英

Create a NIB file for a popover view controller

I am certain that I am missing something very obvious, but...

I want to create a XIB file that contains a view controller (with its embedded view) for display in a popup. Create the XIB itself is not a problem, but sizing it is: Since it assumes it is a top-level view, it insists that it be full screen size, rather than the reduced size of a popover.

Is there a way of doing this, or am I stuck with creating the controller and view programmatically?

在界面构建器中禁用该视图的所有模拟用户界面元素-状态栏,导航栏等。“界面构建器”不允许您使用存在的元素调整视图的大小。

使用setPopoverContentSize设置popOver视图的大小。例如,这将更改弹出窗口的内容视图的大小。

[aPopover setPopoverContentSize:CGSizeMake(200, 300) animated:YES];

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM