marinofaggiana 6 năm trước cách đây
mục cha
commit
9c9155daa6

+ 0 - 1
iOSClient/Main/Create cloud/NCCreateFormUploadRichdocuments.swift

@@ -41,7 +41,6 @@ class NCCreateFormUploadRichdocuments: XLFormViewController, NCSelectDelegate, U
     @IBOutlet weak var collectionView: UICollectionView!
     @IBOutlet weak var collectionViewHeigth: NSLayoutConstraint!
     
-
     // Layout
     let numItems = 2
     let sectionInsets: CGFloat = 10

+ 2 - 2
iOSClient/Main/Create cloud/NCCreateFormUploadVoiceNote.storyboard

@@ -19,7 +19,7 @@
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <subviews>
                             <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" scrollEnabled="NO" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="eeP-9N-ZRP">
-                                <rect key="frame" x="0.0" y="64" width="375" height="200"/>
+                                <rect key="frame" x="0.0" y="89" width="375" height="200"/>
                                 <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                 <constraints>
                                     <constraint firstAttribute="height" constant="200" id="kKy-VZ-d0g"/>
@@ -32,7 +32,7 @@
                         </subviews>
                         <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                         <constraints>
-                            <constraint firstItem="eeP-9N-ZRP" firstAttribute="top" secondItem="ILQ-5j-b92" secondAttribute="top" id="AEH-dn-vHh"/>
+                            <constraint firstItem="eeP-9N-ZRP" firstAttribute="top" secondItem="ILQ-5j-b92" secondAttribute="top" constant="25" id="AEH-dn-vHh"/>
                             <constraint firstItem="eeP-9N-ZRP" firstAttribute="leading" secondItem="ILQ-5j-b92" secondAttribute="leading" id="pNx-zH-54E"/>
                             <constraint firstItem="ILQ-5j-b92" firstAttribute="trailing" secondItem="eeP-9N-ZRP" secondAttribute="trailing" id="yxz-bK-MTp"/>
                         </constraints>

+ 12 - 7
iOSClient/Main/Create cloud/NCCreateFormUploadVoiceNote.swift

@@ -46,12 +46,10 @@ class NCCreateFormUploadVoiceNote: XLFormViewController, NCSelectDelegate {
         self.serverUrl = serverUrl
         self.fileNamePath = fileNamePath
     }
-        
-    //MARK: XLFormDescriptorDelegate
     
     func initializeForm() {
         
-        let form : XLFormDescriptor = XLFormDescriptor(title: NSLocalizedString("_voice_memo_title_", comment: "")) as XLFormDescriptor
+        let form : XLFormDescriptor = XLFormDescriptor() as XLFormDescriptor
         form.rowNavigationOptions = XLFormRowNavigationOptions.stopDisableRow
         
         var section : XLFormSectionDescriptor
@@ -59,7 +57,7 @@ class NCCreateFormUploadVoiceNote: XLFormViewController, NCSelectDelegate {
         
         // Section: Destination Folder
         
-        section = XLFormSectionDescriptor.formSection(withTitle: NSLocalizedString("_save_path_", comment: ""))
+        section = XLFormSectionDescriptor.formSection(withTitle: NSLocalizedString("_save_path_", comment: "").uppercased())
         form.addFormSection(section)
         
         row = XLFormRowDescriptor(tag: "ButtonDestinationFolder", rowType: XLFormRowDescriptorTypeButton, title: self.titleServerUrl)
@@ -78,7 +76,7 @@ class NCCreateFormUploadVoiceNote: XLFormViewController, NCSelectDelegate {
         section = XLFormSectionDescriptor.formSection(withTitle: NSLocalizedString("_filename_", comment: ""))
         form.addFormSection(section)
         
-        row = XLFormRowDescriptor(tag: "fileName", rowType: XLFormRowDescriptorTypeAccount, title: NSLocalizedString("_filename_", comment: ""))
+        row = XLFormRowDescriptor(tag: "fileName", rowType: XLFormRowDescriptorTypeAccount, title: NSLocalizedString("_filename_", comment: "").uppercased())
         row.value = self.fileName
         
         row.cellConfig["textLabel.font"] = UIFont.systemFont(ofSize: 15.0)
@@ -121,14 +119,18 @@ class NCCreateFormUploadVoiceNote: XLFormViewController, NCSelectDelegate {
         }
     }
     
+    override func tableView(_ tableView: UITableView, willDisplayHeaderView view: UIView, forSection section: Int) {
+        let header: UITableViewHeaderFooterView = view as! UITableViewHeaderFooterView
+        header.textLabel?.font = UIFont.systemFont(ofSize: 13.0)
+        header.textLabel?.textColor = NCBrandColor.sharedInstance.icon //UIColor.lightGray
+    }
+    
     // MARK: - View Life Cycle
     
     override func viewDidLoad() {
-        
         super.viewDidLoad()
         
         let cancelButton : UIBarButtonItem = UIBarButtonItem(title: NSLocalizedString("_cancel_", comment: ""), style: UIBarButtonItem.Style.plain, target: self, action: #selector(cancel))
-        
         let saveButton : UIBarButtonItem = UIBarButtonItem(title: NSLocalizedString("_save_", comment: ""), style: UIBarButtonItem.Style.plain, target: self, action: #selector(save))
         
         self.navigationItem.leftBarButtonItem = cancelButton
@@ -141,6 +143,9 @@ class NCCreateFormUploadVoiceNote: XLFormViewController, NCSelectDelegate {
         
         self.tableView.separatorStyle = UITableViewCell.SeparatorStyle.none
         
+        // title
+        self.title = NSLocalizedString("_voice_memo_title_", comment: "")
+                
         // form
         initializeForm()
     }