mirror of
https://github.com/NohamR/TrollDecrypt-tvOS.git
synced 2026-11-25 15:29:56 +00:00
Add 'Delete' action to file options alert
This commit is contained in:
1 parent
869e625770
commit
05b73595d8
1 file changed
+8
@@ -124,6 +124,14 @@ UIAlertController *doneController2 = NULL;
|
||||
}];
|
||||
[doneController2 addAction:openAction];
|
||||
|
||||
UIAlertAction *deleteFileAction = [UIAlertAction actionWithTitle:@"Delete" style:UIAlertActionStyleDestructive handler:^(UIAlertAction *action) {
|
||||
[[NSFileManager defaultManager] removeItemAtPath:path error:nil];
|
||||
[self refresh];
|
||||
[kw2 removeFromSuperview];
|
||||
kw2.hidden = YES;
|
||||
}];
|
||||
[doneController2 addAction:deleteFileAction];
|
||||
|
||||
[self presentViewController:doneController2 animated:YES completion:nil];
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user