views:

80

answers:

1

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!

+1  A: 

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
V1ru8
Thanks V1ru8!Worked perfectly - Much appreciated.
Matt
You're welcome. When I helped you then please accept my answer. Thx.
V1ru8