how can I make a popover and arrow with presentPopoverFromRect?
I don't understand how t开发者_如何学编程o define the (CGRect)rect
in order to control the position of popover, and the position of the arrow.
For example, I have a 1004 x 768 view, how can I put the popover at lower right of the screen, and point the arrow at 700 (x) 1000 (y)?
Nickthedude is right about presentpopoverfromrect, but there is one essential moment with presentpopoverfromrect function: if you don't set popover's contentSizeForViewInPopover property it use defult values - 320*1100 points. And if you popover's rect doesn't fit into screen coordinates (with your coordinates got from the presentpopoverfromrect rect), system places your popover to rectangle which it considered as more optimal.
Cgrectmake(700,1000,10,10) and uipopoverarrowdirectionleft sorry I'm on my iPad so I can't write the exact code but pass those in as the arguments for your presentpopoverfromrect method. The only thing is i think you're too far to the right to put a popover there unless I'm not understanding your question.
精彩评论