Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/objective-c/27.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Objective c 我可以通过编程方式添加iPad popover吗?_Objective C_Cocoa Touch_Uikit_Ipad - Fatal编程技术网

Objective c 我可以通过编程方式添加iPad popover吗?

Objective c 我可以通过编程方式添加iPad popover吗?,objective-c,cocoa-touch,uikit,ipad,Objective C,Cocoa Touch,Uikit,Ipad,是否可以通过编程方式添加popover而不使用NIB文件?我遇到的所有示例都使用NIB文件 如有任何信息/帮助/示例,将不胜感激 谢谢 看一看。 使用内容视图控制器(显示内容的任何UIViewController子类)初始化它,然后可以使用以下内容显示它: - (void)presentPopoverFromRect:(CGRect)rect inView:(UIView *)view permittedArrowDirections:(UIPopoverArrowDirection)arrow

是否可以通过编程方式添加popover而不使用NIB文件?我遇到的所有示例都使用NIB文件

如有任何信息/帮助/示例,将不胜感激

谢谢

看一看。 使用内容视图控制器(显示内容的任何
UIViewController
子类)初始化它,然后可以使用以下内容显示它:

- (void)presentPopoverFromRect:(CGRect)rect inView:(UIView *)view permittedArrowDirections:(UIPopoverArrowDirection)arrowDirections animated:(BOOL)animated


谢谢你!工作完美-非常感谢。
- (void)presentPopoverFromBarButtonItem:(UIBarButtonItem *)item permittedArrowDirections:(UIPopoverArrowDirection)arrowDirections animated:(BOOL)animated