Search code examples
iosuiviewuipopovercontroller

UIPopoverController: How to move it?


I want to move a UIPopoverController. The only way I found was calling [popover presentPopoverFromRect...] with the new position in view.

This actually moves it but doesnt goes exactly where I want, I am using UIPopoverArrowDirectionAny.

There is any other option?


Solution

  • Using [popover presentPopoverFromRect...] is the correct way to move a UIPopoverController as the Technical Q&A document http://developer.apple.com/library/ios/#qa/qa1694/_index.html. If you have an exactly position for your popover, I think you should have an exactly UIPopoverArrowDirection other than using UIPopoverArrowDirectionAny. This may effect to the position of popover.