Browse Source

CreateFormUpload

Marino Faggiana 8 years ago
parent
commit
423ff39956
3 changed files with 34 additions and 4 deletions
  1. 0 3
      iOSClient/AppDelegate.h
  2. 27 0
      iOSClient/Create/CCCreateCloud.swift
  3. 7 1
      iOSClient/Main/CCMain.m

+ 0 - 3
iOSClient/AppDelegate.h

@@ -44,9 +44,6 @@
 #import "CCPhotosCameraUpload.h"
 #import "CCPhotosCameraUpload.h"
 #import "CCFavorite.h"
 #import "CCFavorite.h"
 
 
-// Swift
-#import "Nextcloud-Bridging-Header.h"
-
 #ifdef CC
 #ifdef CC
 @interface AppDelegate : UIResponder <UIApplicationDelegate, BKPasscodeLockScreenManagerDelegate, BKPasscodeViewControllerDelegate, DBRestClientDelegate, LMMediaPlayerViewDelegate, TWMessageBarStyleSheet>
 @interface AppDelegate : UIResponder <UIApplicationDelegate, BKPasscodeLockScreenManagerDelegate, BKPasscodeViewControllerDelegate, DBRestClientDelegate, LMMediaPlayerViewDelegate, TWMessageBarStyleSheet>
 #endif
 #endif

+ 27 - 0
iOSClient/Create/CCCreateCloud.swift

@@ -182,6 +182,33 @@ class CreateMenuAdd: NSObject {
 
 
 class CreateFormUpload: XLFormViewController {
 class CreateFormUpload: XLFormViewController {
     
     
+    required init(coder aDecoder: NSCoder) {
+        super.init(coder: aDecoder)
+        self.initializeForm()
+    }
+    
+    override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: Bundle?) {
+        super.init(nibName: nibNameOrNil, bundle: nibBundleOrNil)
+        self.initializeForm()
+    }
+    
+    func initializeForm() {
+        
+        let form : XLFormDescriptor = XLFormDescriptor(title: "Dates") as XLFormDescriptor
+        
+        var section : XLFormSectionDescriptor
+        var row : XLFormRowDescriptor
+
+        section = XLFormSectionDescriptor.formSection(withTitle: "Inline Dates") as XLFormSectionDescriptor
+        form.addFormSection(section)
+        
+        // TextFieldAndTextView
+        row = XLFormRowDescriptor(tag: "TextFieldAndTextView", rowType: XLFormRowDescriptorTypeButton, title: "Text Fields")
+        section.addFormRow(row)
+        
+        self.form = form
+    }
+
 }
 }
 
 
 
 

+ 7 - 1
iOSClient/Main/CCMain.m

@@ -27,6 +27,8 @@
 #import "CCPhotosCameraUpload.h"
 #import "CCPhotosCameraUpload.h"
 #import "CCSynchronization.h"
 #import "CCSynchronization.h"
 
 
+#import "Nextcloud-Swift.h"
+
 #pragma GCC diagnostic ignored "-Wundeclared-selector"
 #pragma GCC diagnostic ignored "-Wundeclared-selector"
 #pragma clang diagnostic ignored "-Warc-performSelector-leaks"
 #pragma clang diagnostic ignored "-Warc-performSelector-leaks"
 
 
@@ -695,7 +697,11 @@
 {
 {
     [picker dismissViewControllerAnimated:YES completion:^{
     [picker dismissViewControllerAnimated:YES completion:^{
         
         
-        [self uploadFileAsset:assets serverUrl:_localServerUrl cryptated:_isPickerCriptate session:upload_session];
+        CreateFormUpload *menuAdd = [[CreateFormUpload alloc] init];
+        
+        [self presentViewController:menuAdd animated:YES completion:nil];
+        
+        //[self uploadFileAsset:assets serverUrl:_localServerUrl cryptated:_isPickerCriptate session:upload_session];
     }];
     }];
 }
 }