Is it possible to add a popover programatically without using a NIB file? All the examples I have run into use NIB files.
Any information/help/examples would be appreciated.
Thanks!
Is it possible to add a popover programatically without 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