行动表警告?
我在我的应用程序中添加了一个操作表。我的应用程序是基于选项卡栏的应用程序。 我已经以这种方式添加了它
actionSheet = [[UIActionSheet alloc] initWithTitle:nil
delegate:self
cancelButtonTitle:@"Cancel"
destructiveButtonTitle:nil
otherButtonTitles:@"Take photo",@"Use existing photo",nil];
actionSheet.actionSheetStyle = UIBarStyleBlackTranslucent;
[actionSheet showFromTabBar:self.view];
,但它显示警告:
如何删除它。同时,我位于要在其中显示操作表的选项卡中。
I have added an action sheet in my app. My application is tab bar based app.
I have added this in this way
actionSheet = [[UIActionSheet alloc] initWithTitle:nil
delegate:self
cancelButtonTitle:@"Cancel"
destructiveButtonTitle:nil
otherButtonTitles:@"Take photo",@"Use existing photo",nil];
actionSheet.actionSheetStyle = UIBarStyleBlackTranslucent;
[actionSheet showFromTabBar:self.view];
But it shows warning:
How can I remove it. As the same time I am in the tab in which I want to display the action sheet.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
试试这个,它可能对你有帮助。
Try this ,it might help you.
如果在选项卡中,不应该是
[actionSheet showFromTabBar:self.tabBarController.tabBar];
吗?If you are in the tab, shouldn't it be
[actionSheet showFromTabBar:self.tabBarController.tabBar];
?如果您使用标签栏控制器,请像这样使用
If you are use tabbar controller then use like this