开发者

Can I add an iPad popover programatically?

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜