【发布时间】:2017-02-22 16:10:40
【问题描述】:
我想从 UICollectionView 的单元格中显示一个 UIAlertController。
UIAlertController *alert = [UIAlertController alertControllerWithTitle:nil message:nil preferredStyle:UIAlertControllerStyleActionSheet];
UIAlertAction *deleteAction = [UIAlertAction actionWithTitle:@"Delete" style:UIAlertActionStyleDestructive handler:^(UIAlertAction *action) {
}];
UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) {
}];
[alert addAction:deleteAction];
[alert addAction:cancelAction];
[self presentViewController:alert animated:YES completion:nil];
问题是单元格没有 [self presentViewController:alert animated:YES completion:nil];方法。
也许有人可以帮助我?
【问题讨论】:
标签: ios objective-c uicollectionview uicollectionviewcell