marinofaggiana 4 jaren geleden
bovenliggende
commit
b797366bde
1 gewijzigde bestanden met toevoegingen van 4 en 4 verwijderingen
  1. 4 4
      iOSClient/More/NCMore.swift

+ 4 - 4
iOSClient/More/NCMore.swift

@@ -422,10 +422,10 @@ class NCMore: UIViewController, UITableViewDelegate, UITableViewDataSource {
 
             let nameStoryboard = item.url.replacingOccurrences(of: "openStoryboard", with: "")
             let storyboard = UIStoryboard(name: nameStoryboard, bundle: nil)
-            let controller = storyboard.instantiateInitialViewController()! //instantiateViewController(withIdentifier: nameStoryboard)
-            
-            controller.modalPresentationStyle = UIModalPresentationStyle.pageSheet
-            self.present(controller, animated: true, completion: nil)
+            if let controller = storyboard.instantiateInitialViewController() {
+                controller.modalPresentationStyle = UIModalPresentationStyle.pageSheet
+                present(controller, animated: true, completion: nil)
+            }
 
         } else if item.url.contains("//") {