我想UITableView
在警报视图中添加。
我试图添加一个表格视图作为警报视图的子视图,它不起作用。你能给我一些代码或示例链接吗?
我怎样才能做到这一点?
我想UITableView
在警报视图中添加。
我试图添加一个表格视图作为警报视图的子视图,它不起作用。你能给我一些代码或示例链接吗?
我怎样才能做到这一点?
它在我的情况下工作
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"title" message:@"click for submission \n\n\n\n "delegate:self cancelButtonTitle:@"click for submission"
otherButtonTitles:nil];
table = [[UITableView alloc]initWithFrame:CGRectMake(10, 40, 264, 120)];
table.delegate = self;
table.dataSource = self;
[alert addSubview:table];
[alert show];
[table release];
[alert release];
这真的是你想要的吗?
警报非常突兀,并且对用户来说非常令人担忧。警报是模态的,应谨慎使用。也许其中一个可能是更好的解决方案:
而不是UIAlertView + UITableView使用UIActionSheet更好。
您可以对 tableView 列表和 datePicker使用 CAAlertView“ https://github.com/chandanankush/CAAlertView ”