开发者

How to Scroll Popover with ScrollView?

I have a UIscrollview. When I click on a button the popover will appear, the scrollview scrolls up but the popover remains at the same position. How to move the popov开发者_开发问答er to the particular point from where it came on the Scroll View?


UIPopoverController is not meant to scroll with the scroll view. It is meant to stay "popped over" the view. When the view behind the popover is touched, it should disappear.

If you need this functionality, go with a UIView styled to your liking.


Although perhaps not a good UX design, because pop-overs are not supposed to change their positions while they are visible (huge distraction to the user), but I think it can only be done by hiding and redisplaying the pop-up.

[myPopOverController dismissPopoverAnimated:NO];
[myPopOverController presentPopoverFromRect:myNewRect inView:self.view permittedArrowDirections:UIPopoverArrowDirectionAny animated:NO];

Keep animated to NO to minimize the distraction.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜