Anders Sewerin Johansen
Anders Sewerin Johansen

Reputation: 1656

Animated move of UIPopoverController?

So, I have a setup where an UIPopoverController presents information at the cursor in a text view. When the cursor moves, I present it again. But this is jarring, and I'd like for the popover to move in a smooth, animated fashion. Will I really have to do that manually by using a series of presentFromRect calls, or is there a better way?

Upvotes: 0

Views: 1006

Answers (2)

Jonathan Naguin
Jonathan Naguin

Reputation: 14766

If think you cannot do that without use presentFromRect. But if you really want to do this, create your own. Recreate the look of a popover controller using a UIView and track the touches. You can use an alternative like WEPopover.

Upvotes: 1

Heiberg
Heiberg

Reputation: 5507

Unfortunately UIPopovers are not designed to be moved around like that.

The only way to do that without presenting it all over again is to write your own UIPopover replacement and animate its position using the standard CAAnimation or UIKit animation techniques.

Upvotes: 1

Related Questions