0

我使用分段控件作为导航。我的分段控件中的一个按钮是“共享”按钮;单击时,希望显示分段控件中的操作表,箭头朝上,朝向分段控件栏。

这没有正确放置操作表弹出框。操作表箭头不朝上,它朝下。

感谢您的帮助!

 CGRect screenRect = [[UIScreen mainScreen] bounds];

 CGFloat screenWidth = screenRect.size.width;
 CGFloat screenHeight = screenRect.size.height;

 [self.actionSheet  showFromRect:CGRectMake(190,220,screenWidth,screenHeight) inView:self.view animated:YES];
4

2 回答 2

0

这个问题的解决方案,虽然很老套,但源于弄乱了

-(void)showFromRect:(CGRect)rect inView (UIView *)view animated:(BOOL)animated 

并通过以下 SO 帖子:

UIActionSheet 更改箭头位置?

于 2012-09-10T13:42:34.733 回答
0

iPad 上显示的 UIActionSheet 显示在屏幕中间,没有箭头。你的问题不清楚。

我相信您实际上正在(或应该)为此目的使用 UIPopoverController。你能完成你的代码示例吗?

于 2012-09-01T20:44:46.837 回答