UIPopoverControllerで矢印を表示しないようにする
UIPopoverControllerで矢印を表示しないようにするにはpresentPopoverFromRectのpermittedArrowDirectionsに0を渡せば良い。
しかしMonoTouchのPresentFromRectメソッドはUIPopoverArrowDirection列挙値しか受け付けてくれない。というわけで0を渡せるようにしてみた。
public class UIPopoverController2: UIPopoverController { private static IntPtr selPresentFromRect = Selector.GetHandle ("presentPopoverFromRect:inView:permittedArrowDirections:animated:"); public UIPopoverController2 (UIViewController viewController) : base (viewController) { } public void PresentFromRect (RectangleF rect, UIView view, uint arrowDirections, bool animated) { if (view == null) { throw new ArgumentNullException ("view"); } if (this.IsDirectBinding) { Messaging.void_objc_msgSend_RectangleF_IntPtr_UInt32_bool (base.Handle, UIPopoverController2.selPresentFromRect, rect, view.Handle, arrowDirections, animated); } else { Messaging.void_objc_msgSendSuper_RectangleF_IntPtr_UInt32_bool (base.SuperHandle, UIPopoverController2.selPresentFromRect, rect, view.Handle, arrowDirections, animated); } } }