I want to show a UIAlertController from the Cell of a UICollectionView.
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];
The problem is that the cell doesn't have the [self presentViewController:alert animated:YES completion:nil]; method.
Maybe someone can help me?