Ios4 UISegmentedControl上的箭头UIPopoverController

Ios4 UISegmentedControl上的箭头UIPopoverController,ios4,ipad,uisegmentedcontrol,uiactionsheet,Ios4,Ipad,Uisegmentedcontrol,Uiactionsheet,我有一个右按钮上的分段控件,有4个按钮。现在,该代码可以工作: [actionSheet showFromBarButtonItem:self.switchView.navigationItem.rightBarButtonItem animated:YES]; 但是UIActionSheet(popover)中的箭头并不正确。所以我可能不得不用这个: [actionSheet showFromRect:(CGRect)rect inView:(UIView *)view animated:(

我有一个右按钮上的分段控件,有4个按钮。现在,该代码可以工作:

[actionSheet showFromBarButtonItem:self.switchView.navigationItem.rightBarButtonItem animated:YES];
但是UIActionSheet(popover)中的箭头并不正确。所以我可能不得不用这个:

[actionSheet showFromRect:(CGRect)rect inView:(UIView *)view animated:(BOOL)animated];
但是我不知道如何正确使用它。。我尝试了不同的方法,但没有取得好的效果。有人有这个吗

谢谢

你应该这样做

[actionSheet showFromRect:self.switchview.frame inView:self.view animated:YES];