开发者

Can I add an iPad popover programatically?

开发者 https://www.devze.com 2023-01-12 08:57 出处:网络
Is it possible to add a popover programatically witho开发者_如何学Cut using a NIB file? All the examples I have run into use NIB files.

Is it possible to add a popover programatically witho开发者_如何学Cut using a NIB file? All the examples I have run into use NIB files.

Any information/help/examples would be appreciated.

Thanks!


Take a look at the UIPopoverController. Init it with a content view controller (any UIViewController subclass that shows your content), and afterwards you can show it with:

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

or

- (void)presentPopoverFromBarButtonItem:(UIBarButtonItem *)item permittedArrowDirections:(UIPopoverArrowDirection)arrowDirections animated:(BOOL)animated
0

精彩评论

暂无评论...
验证码 换一张
取 消