我在 UIViewController 中创建了 UITabbar。然后我向它添加了一个 UIActionSheet,但是当操作表出现时,当单击“取消”按钮的顶部时,它可以工作,但是当我单击“取消”的底部时,没有响应。我使用此代码添加操作表:
actionSheetDelete = [[UIActionSheet alloc] initWithTitle:@"Do you want to continue?" delegate:self cancelButtonTitle:@"Cancel" destructiveButtonTitle:@"Delete Item(s)" otherButtonTitles:nil];
actionSheetDelete.actionSheetStyle = UIActionSheetStyleBlackOpaque;
[actionSheetDelete showInView:self.view];
[actionSheetDelete release];
当我单击操作表时,我总是在控制台中显示此警报:
Presenting action sheet clipped by its superview. Some controls might not respond to touches. On iPhone try -[UIActionSheet showFromTabBar:] or -[UIActionSheet showFromToolbar:] instead of -[UIActionSheet showInView:].
你有什么建议吗?提前致谢