marinofaggiana 5 vuotta sitten
vanhempi
commit
0b76e2f099

+ 0 - 1
iOSClient/Main/CCMain.m

@@ -1941,7 +1941,6 @@
     NCViewerRichWorkspace *viewerRichWorkspace = (NCViewerRichWorkspace *)[navigationController topViewController];
     viewerRichWorkspace.richWorkspace = self.richWorkspace;
     viewerRichWorkspace.serverUrl = self.serverUrl;
-    viewerRichWorkspace.titleCloseItem = NSLocalizedString(@"_back_", nil);
     
     navigationController.modalPresentationStyle = UIModalPresentationFullScreen;
     

+ 1 - 1
iOSClient/RichWorkspace/NCRichWorkspace.xib

@@ -14,7 +14,7 @@
             <rect key="frame" x="0.0" y="0.0" width="320" height="480"/>
             <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
             <subviews>
-                <textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" editable="NO" textAlignment="natural" translatesAutoresizingMaskIntoConstraints="NO" id="wri-16-tQY">
+                <textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" textAlignment="natural" translatesAutoresizingMaskIntoConstraints="NO" id="wri-16-tQY">
                     <rect key="frame" x="15" y="5" width="295" height="470"/>
                     <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                     <color key="textColor" systemColor="labelColor" cocoaTouchSystemColor="darkTextColor"/>

+ 4 - 19
iOSClient/RichWorkspace/NCViewerRichWorkspace.storyboard

@@ -16,22 +16,11 @@
                         <rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <subviews>
-                            <toolbar opaque="NO" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="PhD-q3-64a">
-                                <rect key="frame" x="0.0" y="813" width="414" height="49"/>
-                                <items>
-                                    <barButtonItem style="plain" systemItem="flexibleSpace" id="mbx-my-iUr"/>
-                                    <barButtonItem title="Item" id="Hvx-vk-mTM">
-                                        <connections>
-                                            <action selector="editItemAction:" destination="6oU-Ar-6R2" id="Y6f-gQ-0vW"/>
-                                        </connections>
-                                    </barButtonItem>
-                                </items>
-                            </toolbar>
                             <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ZTH-4c-how" customClass="NCViewRichWorkspace" customModule="Nextcloud" customModuleProvider="target">
-                                <rect key="frame" x="0.0" y="88" width="414" height="725"/>
+                                <rect key="frame" x="0.0" y="88" width="414" height="774"/>
                                 <subviews>
                                     <textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" editable="NO" textAlignment="natural" translatesAutoresizingMaskIntoConstraints="NO" id="tWU-uH-OcN">
-                                        <rect key="frame" x="15" y="5" width="389" height="720"/>
+                                        <rect key="frame" x="15" y="5" width="389" height="769"/>
                                         <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                         <color key="textColor" systemColor="labelColor" cocoaTouchSystemColor="darkTextColor"/>
                                         <fontDescription key="fontDescription" type="system" pointSize="14"/>
@@ -40,10 +29,10 @@
                                 </subviews>
                                 <color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
                                 <constraints>
+                                    <constraint firstAttribute="bottom" secondItem="tWU-uH-OcN" secondAttribute="bottom" id="0JY-Sv-nGd"/>
                                     <constraint firstItem="tWU-uH-OcN" firstAttribute="leading" secondItem="ZTH-4c-how" secondAttribute="leading" constant="15" id="Etf-Ey-64j"/>
                                     <constraint firstAttribute="trailing" secondItem="tWU-uH-OcN" secondAttribute="trailing" constant="10" id="b6f-DP-hJI"/>
                                     <constraint firstItem="tWU-uH-OcN" firstAttribute="top" secondItem="ZTH-4c-how" secondAttribute="top" constant="5" id="d81-lI-ub5"/>
-                                    <constraint firstAttribute="bottom" secondItem="tWU-uH-OcN" secondAttribute="bottom" id="v0G-Wp-3yv"/>
                                 </constraints>
                                 <connections>
                                     <outlet property="textView" destination="tWU-uH-OcN" id="kaU-Ye-UzC"/>
@@ -54,17 +43,13 @@
                         <constraints>
                             <constraint firstItem="ZTH-4c-how" firstAttribute="leading" secondItem="Isy-ab-db7" secondAttribute="leading" id="GN8-UG-8rE"/>
                             <constraint firstItem="ZTH-4c-how" firstAttribute="top" secondItem="Isy-ab-db7" secondAttribute="top" id="KgT-gT-3KV"/>
-                            <constraint firstItem="Isy-ab-db7" firstAttribute="bottom" secondItem="PhD-q3-64a" secondAttribute="bottom" id="Wg0-V3-osp"/>
-                            <constraint firstItem="PhD-q3-64a" firstAttribute="leading" secondItem="Isy-ab-db7" secondAttribute="leading" id="ZCg-As-Mj2"/>
-                            <constraint firstItem="Isy-ab-db7" firstAttribute="trailing" secondItem="PhD-q3-64a" secondAttribute="trailing" id="hlV-u7-OaC"/>
+                            <constraint firstItem="Isy-ab-db7" firstAttribute="bottom" secondItem="ZTH-4c-how" secondAttribute="bottom" id="qnK-fT-kwF"/>
                             <constraint firstItem="Isy-ab-db7" firstAttribute="trailing" secondItem="ZTH-4c-how" secondAttribute="trailing" id="xKM-8k-2Bn"/>
-                            <constraint firstItem="PhD-q3-64a" firstAttribute="top" secondItem="ZTH-4c-how" secondAttribute="bottom" id="xPd-wR-Fvh"/>
                         </constraints>
                         <viewLayoutGuide key="safeArea" id="Isy-ab-db7"/>
                     </view>
                     <navigationItem key="navigationItem" id="YSS-NL-35O"/>
                     <connections>
-                        <outlet property="editItem" destination="Hvx-vk-mTM" id="KTx-5P-tI0"/>
                         <outlet property="viewRichWorkspace" destination="ZTH-4c-how" id="Tj4-ng-4pc"/>
                     </connections>
                 </viewController>

+ 5 - 4
iOSClient/RichWorkspace/NCViewerRichWorkspace.swift

@@ -27,20 +27,21 @@ import NCCommunication
 @objc class NCViewerRichWorkspace: UIViewController, UIAdaptivePresentationControllerDelegate {
 
     @IBOutlet weak var viewRichWorkspace: NCViewRichWorkspace!
-    @IBOutlet weak var editItem: UIBarButtonItem!
     
     private let appDelegate = UIApplication.shared.delegate as! AppDelegate
     @objc public var richWorkspace: String = ""
     @objc public var serverUrl: String = ""
-    @objc public var titleCloseItem: String = ""
    
     override func viewDidLoad() {
         super.viewDidLoad()
         
         presentationController?.delegate = self
-        let closeItem = UIBarButtonItem(title: titleCloseItem, style: .plain, target: self, action: #selector(closeItemTapped(_:)))
+        
+        let closeItem = UIBarButtonItem(title: NSLocalizedString("_back_", comment: ""), style: .plain, target: self, action: #selector(closeItemTapped(_:)))
         self.navigationItem.leftBarButtonItem = closeItem
-        editItem.image = UIImage(named: "actionSheetModify")
+                
+        let editItem = UIBarButtonItem(image: UIImage(named: "actionSheetModify"), style: UIBarButtonItem.Style.plain, target: self, action: #selector(editItemAction(_:)))
+        self.navigationItem.rightBarButtonItem = editItem
 
         viewRichWorkspace.setRichWorkspaceText(richWorkspace, gradient: false)