Fixed 26.2 SDK errors + AirDrop 'done' bug

This commit is contained in:
√(noham)²
2026-05-28 00:20:30 +02:00
parent 26e6ed4c8d
commit 3d40efe291
8 changed files with 27 additions and 16 deletions

View File

@@ -50,12 +50,12 @@
cell.textLabel.text = self.fileList[indexPath.row];
cell.detailTextLabel.text = [dateFormatter stringFromDate:date];
cell.detailTextLabel.textColor = [UIColor systemGray2Color];
cell.detailTextLabel.textColor = [UIColor grayColor];
cell.imageView.image = [UIImage systemImageNamed:@"doc.fill"];
UILabel *label = [[UILabel alloc] init];
label.text = [NSString stringWithFormat:@"%.2f MB", [fileSize doubleValue] / 1000000.0f];
label.textColor = [UIColor systemGray2Color];
label.textColor = [UIColor grayColor];
label.font = [UIFont systemFontOfSize:12.0f];
[label sizeToFit];
label.textAlignment = NSTextAlignmentCenter;
@@ -73,6 +73,7 @@
return YES;
}
#if !TARGET_OS_TV
- (UISwipeActionsConfiguration *)tableView:(UITableView *)tableView trailingSwipeActionsConfigurationForRowAtIndexPath:(NSIndexPath *)indexPath {
UIContextualAction *deleteAction = [UIContextualAction contextualActionWithStyle:UIContextualActionStyleDestructive title:@"Delete" handler:^(UIContextualAction *action, UIView *sourceView, void (^completionHandler)(BOOL)) {
NSString *file = self.fileList[indexPath.row];
@@ -84,6 +85,7 @@
UISwipeActionsConfiguration *swipeActions = [UISwipeActionsConfiguration configurationWithActions:@[deleteAction]];
return swipeActions;
}
#endif
UIWindow *kw2 = NULL;
UIAlertController *doneController2 = NULL;
@@ -111,8 +113,11 @@ UIAlertController *doneController2 = NULL;
[sharingUI load];
id sharingView = [[objc_getClass("SFAirDropSharingViewControllerTV") alloc] initWithSharingItems:@[url]];
[sharingView setCompletionHandler:^(NSError *error) {
[self dismissViewControllerAnimated:true completion:nil];
[self dismissViewControllerAnimated:NO completion:^{
[self presentViewController:sharingView animated:YES completion:nil];
[sharingView setCompletionHandler:^(NSError *error) {
[self dismissViewControllerAnimated:YES completion:nil];
}];
}];
[self presentViewController:sharingView animated:true completion:nil];