开发者

Programmatically set the arrow tip of a popup

I am missing the right terminology thus find it hard to Google / search for a solution - nevertheless, I want to have the pointing arrow of a popup view pointing to different locations, take a look at the following image to see what I am talking about

Programmatically set the arrow tip of a popup

questions

  1. What is Apple's name / term of this element

  2. How does one programmatically change it's position

  3. Is this element supported by t开发者_开发百科he SDK itself as an element and if state where


You want the popoverArrowDirection property of your UIPopoverController. Set it to one of the UIPopoverArrowDirection values.

You can also specify the allowed direction in either of these functions for showing the popover:

presentPopoverFromRect:inView:permittedArrowDirections:animated:
presentPopoverFromBarButtonItem:permittedArrowDirections:animated:


try this it might help you.....

[popoverController presentPopoverFromRect:CGRectMake(375, 230.0, 0.0, 0.0) inView:self.view  permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜