iPad 应用程序显示 Actionsheet,箭头方向向下而不是向上
当在视图中的任何点显示 actionSheet 时,它会显示一个向下方向的箭头(在操作表下方),即使 actionSheet 在视图中有足够的空间来显示“向上”箭头。
在 iPad 联系人应用程序中,当编辑联系人并按个人资料照片中的“编辑”时,会出现带有向上箭头的操作表,因此“向上”应该是标准的。
以下代码在 iOS 3.2 上导致“向上”箭头,在 iOS 4.2 和 4.3 上导致“向下”箭头。我尝试了不同的矩形和视图。
actionSheetXY = [[UIActionSheet alloc] initWithTitle:nil
delegate:self
cancelButtonTitle:NSLocalizedString(@"cancel",nil)
destructiveButtonTitle:nil
otherButtonTitles:NSLocalizedString(@"test",nil),nil];
actionSheetXY.actionSheetStyle = UIActionSheetStyleDefault;
actionSheetXY.delegate = self;
[actionSheetXY showFromRect:CGRectMake(100,200,320,320) inView:self.view animated:YES];
有没有办法获得向上的箭头?
When displaying an actionSheet at any point in a view it displays an arrow with direction down (below the actionsheet) even though the actionSheet would have enough space in the view to display an "up" arrow.
In the iPad contacts app when editing a contact and pressing on "edit" in the profile photo an actionSheet with arrow direction up appears, so "up" should be standard.
Following code leads on iOS 3.2 to an "up" arrow, on iOS 4.2 and 4.3 to a "down" arrow. I tried different Rects and Views.
actionSheetXY = [[UIActionSheet alloc] initWithTitle:nil
delegate:self
cancelButtonTitle:NSLocalizedString(@"cancel",nil)
destructiveButtonTitle:nil
otherButtonTitles:NSLocalizedString(@"test",nil),nil];
actionSheetXY.actionSheetStyle = UIActionSheetStyleDefault;
actionSheetXY.delegate = self;
[actionSheetXY showFromRect:CGRectMake(100,200,320,320) inView:self.view animated:YES];
Is there a way to get an arrow with direction up?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
箭头将始终指向您定义的这个矩形: CGRectMake(100,200,320,320)
如果您希望它指向一个特定位置,则必须将此矩形更改为您希望箭头指向的点。
如果您希望它指向您的编辑按钮,您需要将该行更改为
the arrow will always point to this rectangle you have defined: CGRectMake(100,200,320,320)
if you want it to point to one particular place, you have to change this rectangle to the point you want the arrow to point.
If you want it to point to your edit button, you need to change the line to