uidocumentpickervc

UIDocumentPickerViewController - How to set the navigation bar color

蹲街弑〆低调 提交于 2019-12-03 06:12:31
I want to set the navigation bar background color of my DocumentPicker to be the same as the rest of my application. let filePicker = UIDocumentPickerViewController(documentTypes: ["public.content"], in: .import) filePicker.delegate = self filePicker.navigationController?.navigationBar.barTintColor = self.theme.navigationBarColor self.present(filePicker, animated: true, completion: nil) doesn't work. Other things I've tried: Use UINavigationBar.appearance().backgroundColor = self.theme.navigationBarColor - doesn't work and looks too much like a workaround instead of a proper way if it works.

UIDocumentPickerViewController dismisses parent view controller

霸气de小男生 提交于 2019-12-02 05:44:59
问题 I have a WKWebView in a view controller. When an user clicks on "Upload File" button (which is on the webpage shown), UIDocumentPickerViewController pops up. This is expected and totally neccessary but: Whenever the user clicks on any button ("Upload Photo or Video", "Cancel"), the UIDocumentPickerViewController dismisses itself AND the parent view controller that it's in. I have added a symbolic breakpoint for [UIViewController dismissViewControllerAnimated:completion:] and indeed saw that

UIDocumentPickerViewController dismisses parent view controller

℡╲_俬逩灬. 提交于 2019-12-02 02:22:18
I have a WKWebView in a view controller. When an user clicks on "Upload File" button (which is on the webpage shown), UIDocumentPickerViewController pops up. This is expected and totally neccessary but: Whenever the user clicks on any button ("Upload Photo or Video", "Cancel"), the UIDocumentPickerViewController dismisses itself AND the parent view controller that it's in. I have added a symbolic breakpoint for [UIViewController dismissViewControllerAnimated:completion:] and indeed saw that -dismissViewController... is called twice. After the first time it dismisses

iCloud UIDocumentPicker crashes intermittently and hangs

寵の児 提交于 2019-11-30 12:38:41
Issue: When choosing a document from iCloud the application randomly crashes, for most of the time the following code will work, but on rare occasions it will fail. I have enabled iCloud entitlement in the app and can't seem to find the reason why it intermittently fails. Is there a check that I'm missing? It's also hanging for a noticeable 5 or so seconds on occasions (usually in the run up to crashing) Code: #pragma mark - iCloud ======================================================================================================= - (void)documentPicker:(UIDocumentPickerViewController *

iCloud UIDocumentPicker crashes intermittently and hangs

六眼飞鱼酱① 提交于 2019-11-29 18:12:55
问题 Issue: When choosing a document from iCloud the application randomly crashes, for most of the time the following code will work, but on rare occasions it will fail. I have enabled iCloud entitlement in the app and can't seem to find the reason why it intermittently fails. Is there a check that I'm missing? It's also hanging for a noticeable 5 or so seconds on occasions (usually in the run up to crashing) Code: #pragma mark - iCloud =============================================================

My app is getting crashed on UIDocumentPickerViewController

落爺英雄遲暮 提交于 2019-11-28 12:05:13
I am working on file sharing on my iOS App, I am new to UIDocumentPickerViewController . I do not know why my app is crashing. UIDocumentPickerViewController *documentPicker = [[UIDocumentPickerViewController alloc] initWithDocumentTypes:@[@"public.image"] inMode:UIDocumentPickerModeImport]; documentPicker.delegate = self; documentPicker.modalPresentationStyle = UIModalPresentationFormSheet; [self presentViewController:documentPicker animated:YES completion:nil]; App is crashing on the highlighted lines. Has anyone done this previously? I want to do the same like the attachment below See

Swift write/save/move a document file to iCloud drive

◇◆丶佛笑我妖孽 提交于 2019-11-28 06:36:55
I've been trying for over two days to write a file to iCloud drive. I have tried writing a simple text file directly, locally then moving it, using UIDocumentMenuViewController, etc. I'm not getting any errors with my code and stepping through debugger, it looks successful, but when I check to see if the file exists or at least the iCloud directory, there is nothing there. I tried on both the simulator and my iPhone, triggering iCloud synching, and everything else I can think of. My main goal is to simply write a text file to the iCloud drive, which later will be "numbers" file I have set up

Implement Document Picker in swift (iOS)

本秂侑毒 提交于 2019-11-28 03:29:00
I want to pick a file of any type(.pdf, .docs, .xlsx, .jpeg, .txt, .rtf, etc) functionality in my iOS app. On clicking on Upload button, I want my app to open a directory and select files( DocumentsPicker ) @IBAction pickDocument(sender: UIButton) { //Open Document Picker } Any approach to do so in Swift ? Alexandros From your project's capabilities, enable both the iCloud and the Key-Sharing . Import MobileCoreServices in your class and finally extended the following three classes inside your UIViewController : UIDocumentMenuDelegate,UIDocumentPickerDelegate,UINavigationControllerDelegate

My app is getting crashed on UIDocumentPickerViewController

◇◆丶佛笑我妖孽 提交于 2019-11-27 06:43:05
问题 I am working on file sharing on my iOS App, I am new to UIDocumentPickerViewController . I do not know why my app is crashing. UIDocumentPickerViewController *documentPicker = [[UIDocumentPickerViewController alloc] initWithDocumentTypes:@[@"public.image"] inMode:UIDocumentPickerModeImport]; documentPicker.delegate = self; documentPicker.modalPresentationStyle = UIModalPresentationFormSheet; [self presentViewController:documentPicker animated:YES completion:nil]; App is crashing on the

Implement Document Picker in swift (iOS)

佐手、 提交于 2019-11-27 05:08:18
问题 I want to pick a file of any type(.pdf, .docs, .xlsx, .jpeg, .txt, .rtf, etc) functionality in my iOS app. On clicking on Upload button, I want my app to open a directory and select files( DocumentsPicker ) @IBAction pickDocument(sender: UIButton) { //Open Document Picker } Any approach to do so in Swift ? 回答1: From your project's capabilities, enable both the iCloud and the Key-Sharing . Import MobileCoreServices in your class and finally extended the following three classes inside your