123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522 |
- //
- // CCCreateCloud.swift
- // Nextcloud
- //
- // Created by Marino Faggiana on 09/01/17.
- // Copyright © 2017 TWS. All rights reserved.
- //
- // Author Marino Faggiana <m.faggiana@twsweb.it>
- //
- // This program is free software: you can redistribute it and/or modify
- // it under the terms of the GNU General Public License as published by
- // the Free Software Foundation, either version 3 of the License, or
- // (at your option) any later version.
- //
- // This program is distributed in the hope that it will be useful,
- // but WITHOUT ANY WARRANTY; without even the implied warranty of
- // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- // GNU General Public License for more details.
- //
- // You should have received a copy of the GNU General Public License
- // along with this program. If not, see <http://www.gnu.org/licenses/>.
- //
- import Foundation
- // MARK: - CreateMenuAdd
- class CreateMenuAdd: NSObject {
-
- let fontButton = [NSFontAttributeName:UIFont(name: "HelveticaNeue", size: 14)!, NSForegroundColorAttributeName:UIColor(colorLiteralRed: 65.0/255.0, green: 64.0/255.0, blue: 66.0/255.0, alpha: 1.0)]
- let fontEncrypted = [NSFontAttributeName:UIFont(name: "HelveticaNeue", size: 14)!, NSForegroundColorAttributeName:UIColor(colorLiteralRed: 241.0/255.0, green: 90.0/255.0, blue: 34.0/255.0, alpha: 1.0)]
- let fontCancel = [NSFontAttributeName:UIFont(name: "HelveticaNeue", size: 16)!, NSForegroundColorAttributeName:UIColor(colorLiteralRed: 0.0/255.0, green: 130.0/255.0, blue: 201.0/255.0, alpha: 1.0)]
- let fontDisable = [NSFontAttributeName:UIFont(name: "HelveticaNeue", size: 12)!, NSForegroundColorAttributeName:UIColor(colorLiteralRed: 65.0/255.0, green: 64.0/255.0, blue: 66.0/255.0, alpha: 1.0)]
- let colorLightGray = UIColor(colorLiteralRed: 250.0/255.0, green: 250.0/255.0, blue: 250.0/255.0, alpha: 1)
-
- func createMenuPlain(view : UIView) {
-
- let appDelegate = UIApplication.shared.delegate as! AppDelegate
- let actionSheet = AHKActionSheet.init(view: view, title: nil)!
-
- actionSheet.animationDuration = 0.2
- actionSheet.automaticallyTintButtonImages = 0
-
- actionSheet.blurRadius = 0.0
- actionSheet.blurTintColor = UIColor(white: 0.0, alpha: 0.50)
-
- actionSheet.buttonHeight = 50.0
- actionSheet.cancelButtonHeight = 50.0
- actionSheet.separatorHeight = 5.0
-
- actionSheet.separatorColor = UIColor(colorLiteralRed: 153.0/255.0, green: 153.0/255.0, blue: 153.0/255.0, alpha: 0.2)
-
- actionSheet.buttonTextAttributes = fontButton
- actionSheet.encryptedButtonTextAttributes = fontEncrypted
- actionSheet.cancelButtonTextAttributes = fontCancel
- actionSheet.disableButtonTextAttributes = fontDisable
-
- actionSheet.cancelButtonTitle = NSLocalizedString("_cancel_", comment: "")
- actionSheet.addButton(withTitle: NSLocalizedString("_create_folder_", comment: ""), image: UIImage(named: "createFolderNextcloud"), backgroundColor: UIColor.white, height: 50.0 ,type: AHKActionSheetButtonType.default, handler: {(AHKActionSheet) -> Void in
- appDelegate.activeMain.returnCreate(Int(returnCreateFolderPlain))
- })
-
- actionSheet.addButton(withTitle: NSLocalizedString("_upload_photos_videos_", comment: ""), image: UIImage(named: "uploadPhotoNextcloud"), backgroundColor: UIColor.white, height: 50.0, type: AHKActionSheetButtonType.default, handler: {(AHKActionSheet) -> Void in
- appDelegate.activeMain.returnCreate(Int(returnCreateFotoVideoPlain))
- })
-
- actionSheet.addButton(withTitle: NSLocalizedString("_upload_file_", comment: ""), image: UIImage(named: "uploadFileNextcloud"), backgroundColor: UIColor.white, height: 50.0, type: AHKActionSheetButtonType.default, handler: {(AHKActionSheet) -> Void in
- appDelegate.activeMain.returnCreate(Int(returnCreateFilePlain))
- })
-
- actionSheet.addButton(withTitle: NSLocalizedString("_upload_encrypted_mode", comment: ""), image: UIImage(named: "actionSheetLock"), backgroundColor: colorLightGray, height: 50.0, type: AHKActionSheetButtonType.encrypted, handler: {(AHKActionSheet) -> Void in
- self.createMenuEncrypted(view: view)
- })
-
- actionSheet.show()
-
- CCUtility.setCreateMenuEncrypted(false)
- }
-
- func createMenuEncrypted(view : UIView) {
-
- let appDelegate = UIApplication.shared.delegate as! AppDelegate
- let actionSheet = AHKActionSheet.init(view: view, title: nil)!
-
- actionSheet.animationDuration = 0.2
-
- actionSheet.blurRadius = 0.0
- actionSheet.blurTintColor = UIColor(white: 0.0, alpha: 0.50)
- actionSheet.buttonHeight = 50.0
- actionSheet.cancelButtonHeight = 50.0
- actionSheet.separatorHeight = 5.0
-
- actionSheet.separatorColor = UIColor(colorLiteralRed: 153.0/255.0, green: 153.0/255.0, blue: 153.0/255.0, alpha: 0.2)
- actionSheet.buttonTextAttributes = fontButton
- actionSheet.encryptedButtonTextAttributes = fontEncrypted
- actionSheet.cancelButtonTextAttributes = fontCancel
- actionSheet.disableButtonTextAttributes = fontDisable
-
- actionSheet.cancelButtonTitle = NSLocalizedString("_cancel_", comment: "")
-
- actionSheet.addButton(withTitle: NSLocalizedString("_create_folder_", comment: ""), image: UIImage(named: "foldercrypto"), backgroundColor: UIColor.white, height: 50.0, type: AHKActionSheetButtonType.encrypted, handler: {(AHKActionSheet) -> Void in
- appDelegate.activeMain.returnCreate(Int(returnCreateFolderEncrypted))
- })
-
- actionSheet.addButton(withTitle: NSLocalizedString("_upload_photos_videos_", comment: ""), image: UIImage(named: "photocrypto"), backgroundColor: UIColor.white, height: 50.0, type: AHKActionSheetButtonType.encrypted, handler: {(AHKActionSheet) -> Void in
- appDelegate.activeMain.returnCreate(Int(returnCreateFotoVideoEncrypted))
- })
-
- actionSheet.addButton(withTitle: NSLocalizedString("_upload_file_", comment: ""), image: UIImage(named: "importCloudCrypto"), backgroundColor: UIColor.white, height: 50.0, type: AHKActionSheetButtonType.encrypted, handler: {(AHKActionSheet) -> Void in
- appDelegate.activeMain.returnCreate(Int(returnCreateFileEncrypted))
- })
- actionSheet.addButton(withTitle: NSLocalizedString("_upload_template_", comment: ""), image: UIImage(named: "template"), backgroundColor: colorLightGray, height: 50.0, type: AHKActionSheetButtonType.encrypted, handler: {(AHKActionSheet) -> Void in
- self.createMenuTemplate(view: view)
- })
- actionSheet.addButton(withTitle: NSLocalizedString("_upload_plain_mode", comment: ""), image: UIImage(named: "uploadPlainModeNextcloud"), backgroundColor: colorLightGray, height: 50.0, type: AHKActionSheetButtonType.default, handler: {(AHKActionSheet) -> Void in
- self.createMenuPlain(view: view)
- })
-
- actionSheet.show()
-
- CCUtility.setCreateMenuEncrypted(true)
- }
- func createMenuTemplate(view : UIView) {
-
- let appDelegate = UIApplication.shared.delegate as! AppDelegate
- let actionSheet = AHKActionSheet.init(view: view, title: nil)!
-
- actionSheet.animationDuration = 0.2
-
- actionSheet.blurRadius = 0.0
- actionSheet.blurTintColor = UIColor(white: 0.0, alpha: 0.50)
- actionSheet.buttonHeight = 50.0
- actionSheet.cancelButtonHeight = 50.0
- actionSheet.separatorHeight = 5.0
-
- actionSheet.separatorColor = UIColor(colorLiteralRed: 153.0/255.0, green: 153.0/255.0, blue: 153.0/255.0, alpha: 0.2)
- actionSheet.buttonTextAttributes = fontButton
- actionSheet.encryptedButtonTextAttributes = fontEncrypted
- actionSheet.cancelButtonTextAttributes = fontCancel
- actionSheet.disableButtonTextAttributes = fontDisable
-
- actionSheet.cancelButtonTitle = NSLocalizedString("_cancel_", comment: "")
-
- actionSheet.addButton(withTitle: NSLocalizedString("_add_notes_", comment: ""), image: UIImage(named: "note"), backgroundColor: UIColor.white, height: 50.0, type: AHKActionSheetButtonType.encrypted, handler: {(AHKActionSheet) -> Void in
- appDelegate.activeMain.returnCreate(Int(returnNote))
- })
-
- actionSheet.addButton(withTitle: NSLocalizedString("_add_web_account_", comment: ""), image: UIImage(named: "baseurl"), backgroundColor: UIColor.white, height: 50.0, type: AHKActionSheetButtonType.encrypted, handler: {(AHKActionSheet) -> Void in
- appDelegate.activeMain.returnCreate(Int(returnAccountWeb))
- })
-
- actionSheet.addButton(withTitle: "", image: nil, backgroundColor: UIColor(colorLiteralRed: 250.0/255.0, green: 250.0/255.0, blue: 250.0/255.0, alpha: 1), height: 10.0, type: AHKActionSheetButtonType.disabled, handler: {(AHKActionSheet) -> Void in
- print("disable")
- })
-
- actionSheet.addButton(withTitle: NSLocalizedString("_add_credit_card_", comment: ""), image: UIImage(named: "cartadicredito"), backgroundColor: UIColor.white, height: 50.0, type: AHKActionSheetButtonType.encrypted, handler: {(AHKActionSheet) -> Void in
- appDelegate.activeMain.returnCreate(Int(returnCartaDiCredito))
- })
-
- actionSheet.addButton(withTitle: NSLocalizedString("_add_atm_", comment: ""), image: UIImage(named: "bancomat"), backgroundColor: UIColor.white, height: 50.0, type: AHKActionSheetButtonType.encrypted, handler: {(AHKActionSheet) -> Void in
- appDelegate.activeMain.returnCreate(Int(returnBancomat))
- })
-
- actionSheet.addButton(withTitle: NSLocalizedString("_add_bank_account_", comment: ""), image: UIImage(named: "contocorrente"), backgroundColor: UIColor.white, height: 50.0, type: AHKActionSheetButtonType.encrypted, handler: {(AHKActionSheet) -> Void in
- appDelegate.activeMain.returnCreate(Int(returnContoCorrente))
- })
-
- actionSheet.addButton(withTitle: "", image: nil, backgroundColor: UIColor(colorLiteralRed: 250.0/255.0, green: 250.0/255.0, blue: 250.0/255.0, alpha: 1), height: 10.0, type: AHKActionSheetButtonType.disabled, handler: {(AHKActionSheet) -> Void in
- print("disable")
- })
-
- actionSheet.addButton(withTitle: NSLocalizedString("_add_driving_license_", comment: ""), image: UIImage(named: "patenteguida"), backgroundColor: UIColor.white, height: 50.0, type: AHKActionSheetButtonType.encrypted, handler: {(AHKActionSheet) -> Void in
- appDelegate.activeMain.returnCreate(Int(returnPatenteGuida))
- })
-
- actionSheet.addButton(withTitle: NSLocalizedString("_add_id_card_", comment: ""), image: UIImage(named: "cartaidentita"), backgroundColor: UIColor.white, height: 50.0, type: AHKActionSheetButtonType.encrypted, handler: {(AHKActionSheet) -> Void in
- appDelegate.activeMain.returnCreate(Int(returnCartaIdentita))
- })
-
- actionSheet.addButton(withTitle: NSLocalizedString("_add_passport_", comment: ""), image: UIImage(named: "passaporto"), backgroundColor: UIColor.white, height: 50.0, type: AHKActionSheetButtonType.encrypted, handler: {(AHKActionSheet) -> Void in
- appDelegate.activeMain.returnCreate(Int(returnPassaporto))
- })
-
- actionSheet.show()
- }
- }
- // MARK: - CreateFormUploadAssets
- class CreateFormUploadAssets: XLFormViewController, CCMoveDelegate {
-
- var serverUrl : String = ""
- var titleServerUrl : String?
- var assets: NSMutableArray = []
- var cryptated : Bool = false
- var session : String = ""
-
- let appDelegate = UIApplication.shared.delegate as! AppDelegate
- let sectionColor: UIColor = UIColor(colorLiteralRed: 239.0/255.0, green: 239.0/255.0, blue: 244.0/255.0, alpha: 1)
-
- convenience init(_ titleServerUrl : String?, serverUrl : String, assets : NSMutableArray, cryptated : Bool, session : String) {
-
- self.init()
-
- if titleServerUrl == nil || titleServerUrl?.isEmpty == true {
- self.titleServerUrl = "/"
- } else {
- self.titleServerUrl = titleServerUrl
- }
-
- self.serverUrl = serverUrl
- self.assets = assets
- self.cryptated = cryptated
- self.session = session
-
- self.initializeForm()
- }
-
- //MARK: XLFormDescriptorDelegate
- func initializeForm() {
- let form : XLFormDescriptor = XLFormDescriptor() as XLFormDescriptor
- form.rowNavigationOptions = XLFormRowNavigationOptions.stopDisableRow
- var section : XLFormSectionDescriptor
- var row : XLFormRowDescriptor
-
- // Section: Destination Folder
-
- section = XLFormSectionDescriptor.formSection()
- form.addFormSection(section)
-
- row = XLFormRowDescriptor(tag: "ButtonDestinationFolder", rowType: XLFormRowDescriptorTypeButton, title: self.titleServerUrl)
- row.cellConfig.setObject(UIImage(named: image_settingsManagePhotos)!, forKey: "imageView.image" as NSCopying)
- row.action.formSelector = #selector(changeDestinationFolder(_:))
- section.addFormRow(row)
-
- // Section: Folder Photo
-
- section = XLFormSectionDescriptor.formSection()
- form.addFormSection(section)
-
- row = XLFormRowDescriptor(tag: "useFolderPhoto", rowType: XLFormRowDescriptorTypeBooleanSwitch, title: NSLocalizedString("_photo_camera_", comment: ""))
- row.value = 0
- section.addFormRow(row)
-
- row = XLFormRowDescriptor(tag: "useSubFolder", rowType: XLFormRowDescriptorTypeBooleanSwitch, title: NSLocalizedString("_upload_camera_create_subfolder_", comment: ""))
- row.hidden = "$\("useFolderPhoto") == 0"
-
- if CCCoreData.getCameraUploadCreateSubfolderActiveAccount(appDelegate.activeAccount) == true {
- row.value = 1
- } else {
- row.value = 0
- }
- section.addFormRow(row)
- // Section: Rename File Name
-
- section = XLFormSectionDescriptor.formSection()
- form.addFormSection(section)
-
- row = XLFormRowDescriptor(tag: "maskFileName", rowType: XLFormRowDescriptorTypeAccount, title: NSLocalizedString("_filename_", comment: ""))
-
- let fileNameMask : String = CCUtility.getFileNameMask(k_keyFileNameMask)
- if fileNameMask.characters.count > 0 {
- row.value = fileNameMask
- }
- section.addFormRow(row)
-
- // Section: Preview File Name
-
- //section = XLFormSectionDescriptor.formSection()
- //form.addFormSection(section)
-
- row = XLFormRowDescriptor(tag: "previewFileName", rowType: XLFormRowDescriptorTypeTextView, title: "")
- row.height = 180
- row.cellConfig.setObject(sectionColor, forKey: "backgroundColor" as NSCopying)
- row.cellConfig.setObject(sectionColor, forKey: "textView.backgroundColor" as NSCopying)
- //row.cellConfig.setObject(10, forKey: "textView.layer.borderWidth" as NSCopying)
- row.disabled = true
- section.addFormRow(row)
-
- self.form = form
- }
-
- override func formRowDescriptorValueHasChanged(_ formRow: XLFormRowDescriptor!, oldValue: Any!, newValue: Any!) {
-
- super.formRowDescriptorValueHasChanged(formRow, oldValue: oldValue, newValue: newValue)
-
- if formRow.tag == "useFolderPhoto" {
-
- if (formRow.value! as AnyObject).boolValue == true {
-
- let buttonDestinationFolder : XLFormRowDescriptor = self.form.formRow(withTag: "ButtonDestinationFolder")!
- buttonDestinationFolder.hidden = true
-
- } else{
-
- let buttonDestinationFolder : XLFormRowDescriptor = self.form.formRow(withTag: "ButtonDestinationFolder")!
- buttonDestinationFolder.hidden = false
- }
- }
- else if formRow.tag == "useSubFolder" {
-
- if (formRow.value! as AnyObject).boolValue == true {
-
- } else{
-
- }
- }
- else if formRow.tag == "maskFileName" {
-
- let fileName : String? = formRow.value as? String
-
- self.form.delegate = nil
-
- if fileName != nil {
- formRow.value = CCUtility.removeForbiddenCharacters(fileName, hasServerForbiddenCharactersSupport: appDelegate.hasServerForbiddenCharactersSupport)
- }
-
- self.form.delegate = self
-
- let previewFileName : XLFormRowDescriptor = self.form.formRow(withTag: "previewFileName")!
- previewFileName.value = self.previewFileName(valueRename: formRow.value as? String)
-
- // reload cell
- if fileName != nil {
-
- if newValue as! String != formRow.value as! String {
-
- self.reloadFormRow(formRow)
-
- appDelegate.messageNotification("_info_", description: "_forbidden_characters_", visible: true, delay: TimeInterval(dismissAfterSecond), type: TWMessageBarMessageType.info)
- }
- }
-
- self.reloadFormRow(previewFileName)
- }
- }
-
- // MARK: - View Life Cycle
- override func viewDidLoad() {
-
- 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.tableView.separatorStyle = UITableViewCellSeparatorStyle.none
- //self.tableView.separatorInset = UIEdgeInsetsMake(0, 0, 0, 0);
-
- self.reloadForm()
- }
- func reloadForm() {
-
- self.form.delegate = nil
-
- let buttonDestinationFolder : XLFormRowDescriptor = self.form.formRow(withTag: "ButtonDestinationFolder")!
- buttonDestinationFolder.title = self.titleServerUrl
-
- let maskFileName : XLFormRowDescriptor = self.form.formRow(withTag: "maskFileName")!
- let previewFileName : XLFormRowDescriptor = self.form.formRow(withTag: "previewFileName")!
- previewFileName.value = self.previewFileName(valueRename: maskFileName.value as? String)
-
- self.tableView.reloadData()
- self.form.delegate = self
- }
- //MARK: TableView
- override func tableView(_ tableView: UITableView, titleForHeaderInSection section: Int) -> String? {
-
- switch section {
-
- case 0:
- let buttonDestinationFolder : XLFormRowDescriptor = self.form.formRow(withTag: "ButtonDestinationFolder")!
-
- if buttonDestinationFolder.isHidden() {
- return ""
- } else {
- return " " + NSLocalizedString("_destination_folder_", comment: "")
- }
- case 1:
- return " " + NSLocalizedString("_use_folder_photos_", comment: "")
- case 2:
- return " " + NSLocalizedString("_rename_filename_", comment: "")
- case 3:
- return NSLocalizedString("_preview_filename_", comment: "")
- default:
- return ""
- }
- }
-
- override func tableView(_ tableView: UITableView, titleForFooterInSection section: Int) -> String? {
-
- switch section {
-
- /*
- case 2:
- let buttonDestinationFolder : XLFormRowDescriptor = self.form.formRow(withTag: "maskFileName")!
- let text = self.writePreviewFileName(buttonDestinationFolder)
- return text
- */
-
- default:
- return ""
- }
- }
- // MARK: - Action
- func moveServerUrl(to serverUrlTo: String!, title: String!, selectedMetadatas: [Any]!) {
-
- self.serverUrl = serverUrlTo
-
- if title == nil {
-
- self.titleServerUrl = "/"
-
- } else {
-
- self.titleServerUrl = title
- }
-
- self.reloadForm()
- }
-
- func save() {
-
- self.dismiss(animated: true, completion: {
-
- let useFolderPhotoRow : XLFormRowDescriptor = self.form.formRow(withTag: "useFolderPhoto")!
- let useSubFolderRow : XLFormRowDescriptor = self.form.formRow(withTag: "useSubFolder")!
- var useSubFolder : Bool = false
-
- if (useFolderPhotoRow.value! as AnyObject).boolValue == true {
- self.serverUrl = CCCoreData.getCameraUploadFolderNamePathActiveAccount(self.appDelegate.activeAccount, activeUrl: self.appDelegate.activeUrl, typeCloud: self.appDelegate.typeCloud)
- useSubFolder = (useSubFolderRow.value! as AnyObject).boolValue
- }
-
- self.appDelegate.activeMain.uploadFileAsset(self.assets, serverUrl: self.serverUrl, cryptated: self.cryptated, useSubFolder: useSubFolder, session: self.session)
- })
- }
- func cancel() {
-
- self.dismiss(animated: true, completion: nil)
- }
-
- // MARK: - Utility
-
- func previewFileName(valueRename : String?) -> String {
-
- var returnString : String = ""
-
- if valueRename != nil {
-
- let valueRenameTrimming = valueRename!.trimmingCharacters(in: CharacterSet.whitespacesAndNewlines)
-
- if valueRenameTrimming.characters.count > 0 {
-
- self.form.delegate = nil
- CCUtility.setFileNameMask(valueRenameTrimming, key: k_keyFileNameMask)
- self.form.delegate = self
-
- returnString = CCUtility.createFileName(from: assets[0] as! PHAsset, key: k_keyFileNameMask)
-
- } else {
-
- CCUtility.setFileNameMask("", key: k_keyFileNameMask)
- returnString = CCUtility.createFileName(from: assets[0] as! PHAsset, key: nil)
- }
-
- } else {
-
- CCUtility.setFileNameMask("", key: k_keyFileNameMask)
- returnString = CCUtility.createFileName(from: assets[0] as! PHAsset, key: nil)
- }
-
- return NSLocalizedString("_preview_filename_", comment: "") + ":" + "\n\n" + returnString
- }
-
- func changeDestinationFolder(_ sender: XLFormRowDescriptor) {
-
- self.deselectFormRow(sender)
-
- let storyboard : UIStoryboard = UIStoryboard(name: "CCMove", bundle: nil)
- let navigationController = storyboard.instantiateViewController(withIdentifier: "CCMove") as! UINavigationController
- let viewController : CCMove = navigationController.topViewController as! CCMove
-
- viewController.delegate = self;
- viewController.tintColor = UIColor.init(colorLiteralRed: 0.0/255.0, green: 130.0/255.0, blue: 201.0/255.0, alpha: 1.0) // COLOR_BRAND
- viewController.barTintColor = UIColor.init(colorLiteralRed: 248.0/255.0, green: 248.0/255.0, blue: 248.0/255.0, alpha: 1.0) // COLOR_BAR;
- viewController.tintColorTitle = UIColor.init(colorLiteralRed: 65.0/255.0, green: 64.0/255.0, blue: 66.0/255.0, alpha: 1.0) // COLOR_GRAY;
- viewController.move.title = NSLocalizedString("_select_", comment: "");
- viewController.networkingOperationQueue = appDelegate.netQueue
-
- navigationController.modalPresentationStyle = UIModalPresentationStyle.formSheet
- self.present(navigationController, animated: true, completion: nil)
- }
-
- }
|