The Popover function "PresentFromBarButtonItem" uses a UIBarButtonItem to display the Popover in a nice place relative to the UIBarButton
Is there a way to get the same outcome behavior but with a UIButton? I would imagine there is some more code, but a way to do so relative the button would be very helpful.
Do you mean presentPopoverFromBarButtonItem instead of PresentFromBarButtonItem?
To popup from a UIButton (or any UIView) you can use presentPopoverFromRect:
//button is some UIButton...
[popoverController presentPopoverFromRect:button.bounds inView:button
permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With