update objective-C style

This commit is contained in:
scawful
2024-08-11 10:25:58 -04:00
parent f2015cd2f6
commit b249d30403
3 changed files with 63 additions and 63 deletions

View File

@@ -15,8 +15,8 @@
@property UIDocumentPickerViewController *documentPicker;
@property (nonatomic, copy) void (^completionHandler)(NSString *selectedFile);
- (void)PresentDocumentPickerWithCompletionHandler:(void (^)(NSString *selectedFile))completionHandler;
- (void)presentDocumentPickerWithCompletionHandler:(void (^)(NSString *selectedFile))completionHandler;
@end

View File

@@ -22,7 +22,7 @@ static std::string selectedFile;
void ShowOpenFileDialogImpl(void (^completionHandler)(std::string)) {
AppDelegate *appDelegate = (AppDelegate *)[UIApplication sharedApplication].delegate;
[appDelegate presentDocumentPickerWithCompletionHandler:^(NSString *filePath) {
[appDelegate PresentDocumentPickerWithCompletionHandler:^(NSString *filePath) {
selectedFile = std::string([filePath UTF8String]);
completionHandler(selectedFile);
}];
@@ -35,11 +35,6 @@ std::string ShowOpenFileDialogSync() {
result = filePath;
});
// Check if the documentPicker is done
// while (result.empty()) {
// [[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate distantFuture]];
// }
return result;
}
}