Marino Faggiana 7 years ago
parent
commit
c92af46532

+ 0 - 2
iOSClient/Create/CCCreateCloud.swift

@@ -651,10 +651,8 @@ class CreateFormUploadFile: XLFormViewController, CCMoveDelegate {
         
         super.viewDidLoad()
         
-        let cancelButton : UIBarButtonItem = UIBarButtonItem(title: NSLocalizedString("_cancel_", comment: ""), style: UIBarButtonItemStyle.plain, target: self, action: #selector(cancel))
         let saveButton : UIBarButtonItem = UIBarButtonItem(title: NSLocalizedString("_save_", comment: ""), style: UIBarButtonItemStyle.plain, target: self, action: #selector(save))
         
-        self.navigationItem.leftBarButtonItem = cancelButton
         self.navigationItem.rightBarButtonItem = saveButton
         
         self.navigationController?.navigationBar.isTranslucent = false

+ 3 - 3
iOSClient/Text/NCText.storyboard

@@ -12,7 +12,7 @@
         <!--Text-->
         <scene sceneID="l1e-ys-YzZ">
             <objects>
-                <viewController id="oRF-nm-GrS" customClass="NCText" customModule="Nextcloud" customModuleProvider="target" sceneMemberID="viewController">
+                <viewController extendedLayoutIncludesOpaqueBars="YES" id="oRF-nm-GrS" customClass="NCText" customModule="Nextcloud" customModuleProvider="target" sceneMemberID="viewController">
                     <layoutGuides>
                         <viewControllerLayoutGuide type="top" id="Uyq-V3-KbV"/>
                         <viewControllerLayoutGuide type="bottom" id="5fD-Qb-N57"/>
@@ -21,7 +21,7 @@
                         <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <subviews>
-                            <textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" textAlignment="natural" translatesAutoresizingMaskIntoConstraints="NO" id="pmg-g2-Fbs">
+                            <textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" keyboardDismissMode="onDrag" textAlignment="natural" translatesAutoresizingMaskIntoConstraints="NO" id="pmg-g2-Fbs">
                                 <rect key="frame" x="0.0" y="0.0" width="375" height="623"/>
                                 <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
                                 <fontDescription key="fontDescription" type="system" pointSize="14"/>
@@ -85,7 +85,7 @@
                 </viewController>
                 <placeholder placeholderIdentifier="IBFirstResponder" id="r2i-QZ-Y8W" userLabel="First Responder" sceneMemberID="firstResponder"/>
             </objects>
-            <point key="canvasLocation" x="1042" y="-197"/>
+            <point key="canvasLocation" x="1040.8" y="-197.45127436281859"/>
         </scene>
         <!--Navigation Controller-->
         <scene sceneID="lyP-Qo-Lgl">

+ 8 - 14
iOSClient/Text/NCText.swift

@@ -41,11 +41,6 @@ class NCText: UIViewController, UITextViewDelegate {
         
         cancelButton.title = NSLocalizedString("_cancel_", comment: "")
         nextButton.title = NSLocalizedString("_next_", comment: "")
-    }
-
-    override func viewWillAppear(_ animated: Bool) {
-
-        super.viewWillAppear(animated)
         
         if let fileName = fileName {
             
@@ -55,7 +50,7 @@ class NCText: UIViewController, UITextViewDelegate {
                 loadText = ""
             }
             textView.isUserInteractionEnabled = false
-
+            
         } else {
             
             self.fileName =  NSLocalizedString("_untitled_txt_", comment: "")
@@ -72,6 +67,11 @@ class NCText: UIViewController, UITextViewDelegate {
             textView.becomeFirstResponder()
         }
     }
+
+    override func viewWillAppear(_ animated: Bool) {
+
+        super.viewWillAppear(animated)
+    }
     
     @IBAction func cancelButtonTapped(_ sender: AnyObject) {
         
@@ -100,14 +100,8 @@ class NCText: UIViewController, UITextViewDelegate {
     
     @IBAction func nextButtonTapped(_ sender: AnyObject) {
         
-        self.dismiss(animated: false, completion: {
-        
-            let form = CreateFormUploadFile.init(self.titleMain, serverUrl: self.serverUrl, text: self.textView.text, fileName: self.fileName!)
-            let navigationController = UINavigationController.init(rootViewController: form)
-            navigationController.modalPresentationStyle = UIModalPresentationStyle.formSheet
-        
-            self.delegate?.present(navigationController, animated: true, completion: nil)
-        })
+        let formViewController = CreateFormUploadFile.init(self.titleMain, serverUrl: self.serverUrl, text: self.textView.text, fileName: self.fileName!)
+        self.navigationController?.pushViewController(formViewController, animated: true)
     }
     
     @IBAction func modifyButtonTapped(_ sender: AnyObject) {