UIActionView 打开的高度高于应有的高度
我有一个操作表,使用下面的代码从我的根视图控制器调用。该视图的底部有一个工具栏,高 44 像素。问题是,当操作表打开时,它并不位于视图的底部,操作视图的底部距离视图底部大约 20 个像素左右,因此某些工具栏在操作表下方可见。在其他视图上使用相同的代码我没有这样的问题。我该如何补救? 任何帮助表示赞赏! lq
UIActionSheet *actionSheet = [[UIActionSheet alloc]
initWithTitle:nil
delegate:self
cancelButtonTitle:@"Do Something"
destructiveButtonTitle:@"Do Something Destructive"
otherButtonTitles:nil];
actionSheet.actionSheetStyle = UIActionSheetStyleDefault;
[actionSheet showInView:self.view];
[actionSheet release];
I have an Action Sheet that is called from my root view controller using the code below. That view has a Toolbar on the bottom of the view measuring 44 pixels high. The problem is when the Action Sheet opens it's not at the bottom of the view, the bottom of the Action View is about 20 or so pixels above the bottom of the view so some of the Toolbar is visible below the Action Sheet. Using the same code on other views I have no such problem. How do I remedy this?
Any help is appreciated!
lq
UIActionSheet *actionSheet = [[UIActionSheet alloc]
initWithTitle:nil
delegate:self
cancelButtonTitle:@"Do Something"
destructiveButtonTitle:@"Do Something Destructive"
otherButtonTitles:nil];
actionSheet.actionSheetStyle = UIActionSheetStyleDefault;
[actionSheet showInView:self.view];
[actionSheet release];
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您有工具栏,请使用
-showFromToolbar:
方法 而不是-showInView:
。If you have a toolbar, use the
-showFromToolbar:
method instead of-showInView:
.