【问题标题】:iPhone UIAlertView UIActionSheet tableViewiPhone UIAlertView UIActionSheet tableView
【发布时间】:2012-05-21 04:34:57
【问题描述】:
我有一个表格视图。当用户单击 tableView 的任何单元格时,我想同时显示 UIAlertView 和 UIActionSheet 。 AlertView 应显示在 ActionSheet 上方。如果用户单击 AlertView 中的“取消”按钮,则 UIActionSheet 和 UIAlertView 应该同时消失。我怎样才能做到这一点?
【问题讨论】:
标签:
iphone
uitableview
uialertview
uiactionsheet
【解决方案1】:
按照这个:-
UIActionSheet *actionSheetTitleFontStyle = [[UIActionSheet alloc] initWithTitle:@"\n\n\n\n\n\n\n\n" delegate:self cancelButtonTitle:@"ok" destructiveButtonTitle:nil otherButtonTitles:nil];
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Hello" message:@"Hello" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil, nil];
[actionSheetTitleFontStyle addSubview:alert];
[alert show];
它可能会帮助你。谢谢:)