mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-25 08:59:58 +00:00
Implements delete in ROM list.
This commit is contained in:
parent
af3bef602f
commit
1d99eac1ec
@ -158,6 +158,21 @@
|
||||
return _sectionNames;
|
||||
}
|
||||
|
||||
- (void)tableView:(UITableView*)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath*)indexPath {
|
||||
if (editingStyle == UITableViewCellEditingStyleDelete) {
|
||||
NSFileManager *fileManager = [NSFileManager defaultManager];
|
||||
RADirectoryItem *path = (RADirectoryItem*)[self itemForIndexPath:indexPath];
|
||||
|
||||
BOOL didRemoveItem = [fileManager removeItemAtPath:path.path error:nil];
|
||||
|
||||
if (didRemoveItem) {
|
||||
[self refresh];
|
||||
} else {
|
||||
apple_display_alert(@"Not possible to delete file.", 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@implementation RAModuleList
|
||||
|
Loading…
Reference in New Issue
Block a user