From 4bfa790236b9c0d70c28101858547c616e75e9e4 Mon Sep 17 00:00:00 2001 From: jan Iversen Date: Sun, 29 Oct 2017 09:12:07 +0100 Subject: iOS documentation and minor corrections Started on documentating all classes, to make it easier for others to understand the code. Change-Id: I5b463f7ae23fb6316dc3f1418d73222360083bdc --- .../LibreOfficeLight.xcodeproj/project.pbxproj | 8 +- .../LibreOfficeLight/AppDelegate.swift | 50 +++++++---- .../iCloudDrive.imageset/Contents.json | 23 ----- .../iCloudDrive.imageset/iCloudDrive.png | Bin 1166 -> 0 bytes .../iCloudDrive.imageset/iCloudDrive@2x.png | Bin 2090 -> 0 bytes .../iCloudDrive.imageset/iCloudDrive@3x.png | Bin 2991 -> 0 bytes .../Assets.xcassets/iPhone.imageset/Contents.json | 23 ----- .../Assets.xcassets/iPhone.imageset/iPhone.png | Bin 1305 -> 0 bytes .../Assets.xcassets/iPhone.imageset/iPhone@2x.png | Bin 1799 -> 0 bytes .../Assets.xcassets/iPhone.imageset/iPhone@3x.png | Bin 2291 -> 0 bytes .../LibreOfficeLight/DocumentController.swift | 89 ++++-------------- .../LibreOfficeLight/PropertiesController.swift | 99 +++++++++++++++++++++ .../LibreOfficeLight/SideMenu.swift | 99 --------------------- .../LibreOfficeLight/en.lproj/Main.storyboard | 10 +-- .../LibreOfficeLight/lokit-Bridging-Header.h | 4 + 15 files changed, 161 insertions(+), 244 deletions(-) delete mode 100644 ios/LibreOfficeLight/LibreOfficeLight/Assets.xcassets/iCloudDrive.imageset/Contents.json delete mode 100644 ios/LibreOfficeLight/LibreOfficeLight/Assets.xcassets/iCloudDrive.imageset/iCloudDrive.png delete mode 100644 ios/LibreOfficeLight/LibreOfficeLight/Assets.xcassets/iCloudDrive.imageset/iCloudDrive@2x.png delete mode 100644 ios/LibreOfficeLight/LibreOfficeLight/Assets.xcassets/iCloudDrive.imageset/iCloudDrive@3x.png delete mode 100644 ios/LibreOfficeLight/LibreOfficeLight/Assets.xcassets/iPhone.imageset/Contents.json delete mode 100644 ios/LibreOfficeLight/LibreOfficeLight/Assets.xcassets/iPhone.imageset/iPhone.png delete mode 100644 ios/LibreOfficeLight/LibreOfficeLight/Assets.xcassets/iPhone.imageset/iPhone@2x.png delete mode 100644 ios/LibreOfficeLight/LibreOfficeLight/Assets.xcassets/iPhone.imageset/iPhone@3x.png create mode 100755 ios/LibreOfficeLight/LibreOfficeLight/PropertiesController.swift delete mode 100755 ios/LibreOfficeLight/LibreOfficeLight/SideMenu.swift diff --git a/ios/LibreOfficeLight/LibreOfficeLight.xcodeproj/project.pbxproj b/ios/LibreOfficeLight/LibreOfficeLight.xcodeproj/project.pbxproj index e22cf317feb6..986ce57cc1b2 100644 --- a/ios/LibreOfficeLight/LibreOfficeLight.xcodeproj/project.pbxproj +++ b/ios/LibreOfficeLight/LibreOfficeLight.xcodeproj/project.pbxproj @@ -22,7 +22,6 @@ 397E09031E597BD8001374E0 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 397E09011E597BD8001374E0 /* Main.storyboard */; }; 397E09081E597BD8001374E0 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 397E09071E597BD8001374E0 /* Assets.xcassets */; }; 3992D85A1E5B762A00BEA987 /* DocumentController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3992D8591E5B762A00BEA987 /* DocumentController.swift */; }; - 3992D85D1E5B764A00BEA987 /* SideMenu.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3992D85B1E5B764A00BEA987 /* SideMenu.swift */; }; 399648471E5B87DC00E73E83 /* ViewProperties.swift in Sources */ = {isa = PBXBuildFile; fileRef = 399648461E5B87DC00E73E83 /* ViewProperties.swift */; }; 39B08B9D1E5F0BB600682A59 /* fundamentalrc in Resources */ = {isa = PBXBuildFile; fileRef = 39B084E51E5F0BB400682A59 /* fundamentalrc */; }; 39B08B9E1E5F0BB600682A59 /* offapi.rdb in Resources */ = {isa = PBXBuildFile; fileRef = 39B084E61E5F0BB400682A59 /* offapi.rdb */; }; @@ -31,6 +30,7 @@ 39B08BD91E5F0BB600682A59 /* services.rdb in Resources */ = {isa = PBXBuildFile; fileRef = 39B085241E5F0BB400682A59 /* services.rdb */; }; 39B091CD1E5F0BB800682A59 /* udkapi.rdb in Resources */ = {isa = PBXBuildFile; fileRef = 39B08B9B1E5F0BB600682A59 /* udkapi.rdb */; }; 39B091CE1E5F0BB800682A59 /* unorc in Resources */ = {isa = PBXBuildFile; fileRef = 39B08B9C1E5F0BB600682A59 /* unorc */; }; + 39EF4E2F1FA500C9001914AC /* PropertiesController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 39EF4E2E1FA500C9001914AC /* PropertiesController.swift */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ @@ -52,7 +52,6 @@ 397E09021E597BD8001374E0 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = en; path = en.lproj/Main.storyboard; sourceTree = ""; }; 397E09071E597BD8001374E0 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = LibreOfficeLight/Assets.xcassets; sourceTree = SOURCE_ROOT; }; 3992D8591E5B762A00BEA987 /* DocumentController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = DocumentController.swift; path = LibreOfficeLight/DocumentController.swift; sourceTree = SOURCE_ROOT; }; - 3992D85B1E5B764A00BEA987 /* SideMenu.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = SideMenu.swift; path = LibreOfficeLight/SideMenu.swift; sourceTree = SOURCE_ROOT; }; 399648461E5B87DC00E73E83 /* ViewProperties.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ViewProperties.swift; path = LibreOfficeLight/ViewProperties.swift; sourceTree = SOURCE_ROOT; }; 39ACF4181F8A317600DA7334 /* loApp.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = loApp.xcconfig; path = ../../../../../../../Users/jani/lo_ios/workdir/ios/loApp.xcconfig; sourceTree = ""; }; 39B084E51E5F0BB400682A59 /* fundamentalrc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = fundamentalrc; path = ../generated/resources/fundamentalrc; sourceTree = SOURCE_ROOT; }; @@ -63,6 +62,7 @@ 39B08B9B1E5F0BB600682A59 /* udkapi.rdb */ = {isa = PBXFileReference; lastKnownFileType = file; name = udkapi.rdb; path = ../generated/resources/udkapi.rdb; sourceTree = SOURCE_ROOT; }; 39B08B9C1E5F0BB600682A59 /* unorc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = unorc; path = ../generated/resources/unorc; sourceTree = SOURCE_ROOT; }; 39B092501E5F3DEA00682A59 /* LibreOfficeLight-Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "LibreOfficeLight-Prefix.pch"; sourceTree = ""; }; + 39EF4E2E1FA500C9001914AC /* PropertiesController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PropertiesController.swift; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -127,8 +127,8 @@ children = ( 39503A6F1F94C4AC00F19C78 /* lokit-Bridging-Header.h */, 397E08FD1E597BD8001374E0 /* AppDelegate.swift */, - 3992D85B1E5B764A00BEA987 /* SideMenu.swift */, 3992D8591E5B762A00BEA987 /* DocumentController.swift */, + 39EF4E2E1FA500C9001914AC /* PropertiesController.swift */, 392ED9B21E5E4B03005C8435 /* ViewPrintManager.swift */, 399648461E5B87DC00E73E83 /* ViewProperties.swift */, 397E09011E597BD8001374E0 /* Main.storyboard */, @@ -253,10 +253,10 @@ buildActionMask = 2147483647; files = ( 392ED9B31E5E4B03005C8435 /* ViewPrintManager.swift in Sources */, - 3992D85D1E5B764A00BEA987 /* SideMenu.swift in Sources */, 399648471E5B87DC00E73E83 /* ViewProperties.swift in Sources */, 3992D85A1E5B762A00BEA987 /* DocumentController.swift in Sources */, 397E08FE1E597BD8001374E0 /* AppDelegate.swift in Sources */, + 39EF4E2F1FA500C9001914AC /* PropertiesController.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/ios/LibreOfficeLight/LibreOfficeLight/AppDelegate.swift b/ios/LibreOfficeLight/LibreOfficeLight/AppDelegate.swift index dd6ee4183a80..12e596bc030d 100644 --- a/ios/LibreOfficeLight/LibreOfficeLight/AppDelegate.swift +++ b/ios/LibreOfficeLight/LibreOfficeLight/AppDelegate.swift @@ -10,6 +10,8 @@ import Foundation +// AppDelegate is a Delegate class that receives calls from the iOS +// kernel, and theirby allows stop/start/sleep of the application @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { @@ -17,15 +19,20 @@ class AppDelegate: UIResponder, UIApplicationDelegate - // MARK: - AppDelegate functions - + // sent when clicking on a OO document in another app + // allowing this app to handle the document. + // remark if the app is not started it will be started first func application(_ app: UIApplication, open url: URL, options: [UIApplicationOpenURLOptionsKey : Any] = [:]) -> Bool { // called when started from another Application. + // Jan to be done return true } + + // this function is called when the app is first started (loaded from EEProm) + // it initializes the LO system and prepares for a normal run func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { // Get version info @@ -40,53 +47,60 @@ class AppDelegate: UIResponder, UIApplicationDelegate //FIX BridgeLOkit_Init(Bundle.main.bundlePath) //FIX BridgeLOkit_open("jan"); //FIX BridgeLOkit_ClientCommand("jan"); - - // Override point for customization after application launch. return true } + // Sent when the application is about to move from active to inactive state. + // This can occur for certain types of temporary interruptions + // (such as an incoming phone call or SMS message) + // or when the user quits the application and it begins the transition to the background state. + // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. func applicationWillResignActive(_ application: UIApplication) { - // Sent when the application is about to move from active to inactive state. - // This can occur for certain types of temporary interruptions - // (such as an incoming phone call or SMS message) - // or when the user quits the application and it begins the transition to the background state. - // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. - // Games should use this method to pause the game. + // NOT used in this App } + // Sent when the application enters background (hipernating) + // Use this method to release shared resources, save user data, invalidate timers, + // and store enough application state information to restore your application to its current state + // in case it is terminated later. + // If your application supports background execution, + // this method is called instead of applicationWillTerminate: when the user quits. func applicationDidEnterBackground(_ application: UIApplication) { - // Use this method to release shared resources, save user data, invalidate timers, - // and store enough application state information to restore your application to its current state - // in case it is terminated later. - // If your application supports background execution, - // this method is called instead of applicationWillTerminate: when the user quits. + // Jan to do done (scale down LO) } + // Sent before the application reenters foreground (hipernating -> active) + // Restart timers, tasks as well as graphic rendering func applicationWillEnterForeground(_ application: UIApplication) { + // Jan to be done (reactivate LO) } + // Sent after the application reenters foreground (hipernating -> active) + // Restart timers, tasks as well as graphic rendering func applicationDidBecomeActive(_ application: UIApplication) { + // NOT used in this App } + // Sent when the application is about to terminate. Save data if appropriate. + // See also applicationDidEnterBackground:. + // Saves changes in the application's managed object context before the application terminates. func applicationWillTerminate(_ application: UIApplication) { - // Called when the application is about to terminate. Save data if appropriate. - // See also applicationDidEnterBackground:. - // Saves changes in the application's managed object context before the application terminates. + // Jan to be done (terminate LO) } } diff --git a/ios/LibreOfficeLight/LibreOfficeLight/Assets.xcassets/iCloudDrive.imageset/Contents.json b/ios/LibreOfficeLight/LibreOfficeLight/Assets.xcassets/iCloudDrive.imageset/Contents.json deleted file mode 100644 index cd69f7f90c00..000000000000 --- a/ios/LibreOfficeLight/LibreOfficeLight/Assets.xcassets/iCloudDrive.imageset/Contents.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "scale" : "1x", - "filename" : "iCloudDrive.png" - }, - { - "idiom" : "universal", - "scale" : "2x", - "filename" : "iCloudDrive@2x.png" - }, - { - "idiom" : "universal", - "scale" : "3x", - "filename" : "iCloudDrive@3x.png" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} diff --git a/ios/LibreOfficeLight/LibreOfficeLight/Assets.xcassets/iCloudDrive.imageset/iCloudDrive.png b/ios/LibreOfficeLight/LibreOfficeLight/Assets.xcassets/iCloudDrive.imageset/iCloudDrive.png deleted file mode 100644 index d213949b467f..000000000000 Binary files a/ios/LibreOfficeLight/LibreOfficeLight/Assets.xcassets/iCloudDrive.imageset/iCloudDrive.png and /dev/null differ diff --git a/ios/LibreOfficeLight/LibreOfficeLight/Assets.xcassets/iCloudDrive.imageset/iCloudDrive@2x.png b/ios/LibreOfficeLight/LibreOfficeLight/Assets.xcassets/iCloudDrive.imageset/iCloudDrive@2x.png deleted file mode 100644 index ba486fbbe6ae..000000000000 Binary files a/ios/LibreOfficeLight/LibreOfficeLight/Assets.xcassets/iCloudDrive.imageset/iCloudDrive@2x.png and /dev/null differ diff --git a/ios/LibreOfficeLight/LibreOfficeLight/Assets.xcassets/iCloudDrive.imageset/iCloudDrive@3x.png b/ios/LibreOfficeLight/LibreOfficeLight/Assets.xcassets/iCloudDrive.imageset/iCloudDrive@3x.png deleted file mode 100644 index 28c41597cf0f..000000000000 Binary files a/ios/LibreOfficeLight/LibreOfficeLight/Assets.xcassets/iCloudDrive.imageset/iCloudDrive@3x.png and /dev/null differ diff --git a/ios/LibreOfficeLight/LibreOfficeLight/Assets.xcassets/iPhone.imageset/Contents.json b/ios/LibreOfficeLight/LibreOfficeLight/Assets.xcassets/iPhone.imageset/Contents.json deleted file mode 100644 index 2d0a29db946a..000000000000 --- a/ios/LibreOfficeLight/LibreOfficeLight/Assets.xcassets/iPhone.imageset/Contents.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "scale" : "1x", - "filename" : "iPhone.png" - }, - { - "idiom" : "universal", - "scale" : "2x", - "filename" : "iPhone@2x.png" - }, - { - "idiom" : "universal", - "scale" : "3x", - "filename" : "iPhone@3x.png" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} diff --git a/ios/LibreOfficeLight/LibreOfficeLight/Assets.xcassets/iPhone.imageset/iPhone.png b/ios/LibreOfficeLight/LibreOfficeLight/Assets.xcassets/iPhone.imageset/iPhone.png deleted file mode 100644 index defe533b489a..000000000000 Binary files a/ios/LibreOfficeLight/LibreOfficeLight/Assets.xcassets/iPhone.imageset/iPhone.png and /dev/null differ diff --git a/ios/LibreOfficeLight/LibreOfficeLight/Assets.xcassets/iPhone.imageset/iPhone@2x.png b/ios/LibreOfficeLight/LibreOfficeLight/Assets.xcassets/iPhone.imageset/iPhone@2x.png deleted file mode 100644 index da7dcbff0dc4..000000000000 Binary files a/ios/LibreOfficeLight/LibreOfficeLight/Assets.xcassets/iPhone.imageset/iPhone@2x.png and /dev/null differ diff --git a/ios/LibreOfficeLight/LibreOfficeLight/Assets.xcassets/iPhone.imageset/iPhone@3x.png b/ios/LibreOfficeLight/LibreOfficeLight/Assets.xcassets/iPhone.imageset/iPhone@3x.png deleted file mode 100644 index 1c827c89af6f..000000000000 Binary files a/ios/LibreOfficeLight/LibreOfficeLight/Assets.xcassets/iPhone.imageset/iPhone@3x.png and /dev/null differ diff --git a/ios/LibreOfficeLight/LibreOfficeLight/DocumentController.swift b/ios/LibreOfficeLight/LibreOfficeLight/DocumentController.swift index c8c374ade570..1ef7d80c792f 100755 --- a/ios/LibreOfficeLight/LibreOfficeLight/DocumentController.swift +++ b/ios/LibreOfficeLight/LibreOfficeLight/DocumentController.swift @@ -7,17 +7,16 @@ // import UIKit -class DocumentController: UIViewController, MenuDelegate, UIDocumentBrowserViewControllerDelegate -{ - var currentDocumentName : String? - var currentCloudUrl : URL? - var currentStorageLocal : Bool = true - - +// DocumentController is the main viewer in the app, it displayes the selected +// documents and holds a top entry to view the properties as well as a normal +// menu to handle global actions +// It is a delegate class to recieve Menu events as well as file handling events +class DocumentController: UIViewController, MenuDelegate, UIDocumentBrowserViewControllerDelegate +{ // Show sidemenu (part of documentcontroller) - @IBAction func doMenu(_ sender: UIBarButtonItem) + @IBAction func doProperties(_ sender: UIBarButtonItem) { if (sender.tag == 99) { sender.tag = 0; @@ -39,20 +38,24 @@ class DocumentController: UIViewController, MenuDelegate, UIDocumentBrowserViewC sender.isEnabled = false sender.tag = 99 - let sidebar : SidebarController = self.storyboard!.instantiateViewController(withIdentifier: "SidebarController") as! SidebarController - view.addSubview(sidebar.view) - addChildViewController(sidebar) - sidebar.view.layoutIfNeeded() + let properties : PropertiesController = self.storyboard!.instantiateViewController(withIdentifier: "PropertiesController") as! PropertiesController + view.addSubview(properties.view) + addChildViewController(properties) + properties.view.layoutIfNeeded() - sidebar.view.frame=CGRect(x: 0 - UIScreen.main.bounds.size.width, y: 0, width: UIScreen.main.bounds.size.width, height: UIScreen.main.bounds.size.height); + properties.view.frame=CGRect(x: 0 - UIScreen.main.bounds.size.width, y: 0, width: UIScreen.main.bounds.size.width, height: UIScreen.main.bounds.size.height); UIView.animate(withDuration: 0.3, animations: { () -> Void in - sidebar.view.frame=CGRect(x: 0, y: 0, width: UIScreen.main.bounds.size.width, height: UIScreen.main.bounds.size.height); + properties.view.frame=CGRect(x: 0, y: 0, width: UIScreen.main.bounds.size.width, height: UIScreen.main.bounds.size.height); sender.isEnabled = true }, completion:nil) } + + // var currentDocumentName : String? + + internal func documentBrowser(_ controller: UIDocumentBrowserViewController, didRequestDocumentCreationWithHandler importHandler: @escaping (URL?, UIDocumentBrowserViewController.ImportMode) -> Void) { @@ -95,13 +98,6 @@ class DocumentController: UIViewController, MenuDelegate, UIDocumentBrowserViewC - func actionName(_ name : String) - { - currentDocumentName = name - } - - - func actionMenuSelected(_ tag : Int) { switch tag @@ -120,15 +116,6 @@ class DocumentController: UIViewController, MenuDelegate, UIDocumentBrowserViewC print("menu Save to be done") case 3: // Save as... - let vc = storyboard?.instantiateViewController(withIdentifier: "setNameAction") as! setNameAction - vc.modalPresentationStyle = .popover - vc.delegate = self - let popover = vc.popoverPresentationController! - popover.delegate = self as? UIPopoverPresentationControllerDelegate - popover.permittedArrowDirections = .up - popover.sourceView = janTest - popover.sourceRect = janTest.bounds - present(vc, animated: true, completion: nil) print("menu Save as... to be done") case 4: // Save as PDF... @@ -168,7 +155,6 @@ class DocumentController: UIViewController, MenuDelegate, UIDocumentBrowserViewC protocol MenuDelegate { func actionMenuSelected(_ tag : Int) - func actionName(_ name : String) } @@ -207,44 +193,3 @@ class DocumentActions: UITableViewController } - -class setNameAction: UIViewController -{ - // Pointer to callback class - var delegate : MenuDelegate? - var didEdit : Bool = false - - // reference to new name - @IBOutlet weak var editText: UITextField! - - - // continue "save as..." with new name - @IBAction func actionOK(_ sender: UIButton) - { - dismiss(animated: false) - if didEdit && editText.text != "" { - delegate?.actionName(editText.text!) - } - } - - - @IBAction func actionStartEdit(_ sender: UITextField) - { - if !didEdit { - sender.text = "" - didEdit = true - } - } - - @IBAction func actionCancel(_ sender: UIButton) - { - dismiss(animated: false) - } - - - override func viewDidLoad() - { - super.viewDidLoad() - } -} - diff --git a/ios/LibreOfficeLight/LibreOfficeLight/PropertiesController.swift b/ios/LibreOfficeLight/LibreOfficeLight/PropertiesController.swift new file mode 100755 index 000000000000..04ebaf78d670 --- /dev/null +++ b/ios/LibreOfficeLight/LibreOfficeLight/PropertiesController.swift @@ -0,0 +1,99 @@ +// +// This file is part of the LibreOffice project. +// +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at http://mozilla.org/MPL/2.0/. +// +import UIKit + + +class PropertiesController: UIViewController +{ + // Temp. functions + @IBAction func doStyle1(_ sender: UIButton) + { + loadController("Document") + } + + + + @IBAction func doStyle2(_ sender: UIButton) + { + loadController("Document") + } + + + + @IBAction func doStyle3(_ sender: UIButton) + { + loadController("Document") + } + + + + @IBAction func doStyle4(_ sender: UIButton) + { + loadController("Document") + } + + + + @IBAction func doStyle5(_ sender: UIButton) + { + loadController("Document") + } + + + + @IBAction func doStyle6(_ sender: UIButton) + { + loadController("Document") + } + + + @IBAction func doStyle7(_ sender: UIButton) + { + loadController("Document") + } + + + + func loadController(_ name:String) + { + let destController : UIViewController = self.storyboard!.instantiateViewController(withIdentifier: name) + self.navigationController!.pushViewController(destController, animated: true) + + UIView.animate(withDuration: 0.3, animations: { () -> Void in + self.view.frame = CGRect(x: -UIScreen.main.bounds.size.width, y: 0, width: UIScreen.main.bounds.size.width,height: UIScreen.main.bounds.size.height) + self.view.layoutIfNeeded() + self.view.backgroundColor = UIColor.clear + }, completion: { (finished) -> Void in + self.view.removeFromSuperview() + self.removeFromParentViewController() + }) + } + + + + override func viewDidLoad() + { + super.viewDidLoad() + // Do any additional setup after loading the view. + } + + + + override func didReceiveMemoryWarning() + { + super.didReceiveMemoryWarning() + // Dispose of any resources that can be recreated. + } + + + + override func viewWillAppear(_ animated: Bool) + { + super.viewWillAppear(animated) + } +} diff --git a/ios/LibreOfficeLight/LibreOfficeLight/SideMenu.swift b/ios/LibreOfficeLight/LibreOfficeLight/SideMenu.swift deleted file mode 100755 index ad3b1b8221cc..000000000000 --- a/ios/LibreOfficeLight/LibreOfficeLight/SideMenu.swift +++ /dev/null @@ -1,99 +0,0 @@ -// -// This file is part of the LibreOffice project. -// -// This Source Code Form is subject to the terms of the Mozilla Public -// License, v. 2.0. If a copy of the MPL was not distributed with this -// file, You can obtain one at http://mozilla.org/MPL/2.0/. -// -import UIKit - - -class SidebarController: UIViewController -{ - // Temp. functions - @IBAction func doStyle1(_ sender: UIButton) - { - loadController("Document") - } - - - - @IBAction func doStyle2(_ sender: UIButton) - { - loadController("Document") - } - - - - @IBAction func doStyle3(_ sender: UIButton) - { - loadController("Document") - } - - - - @IBAction func doStyle4(_ sender: UIButton) - { - loadController("Document") - } - - - - @IBAction func doStyle5(_ sender: UIButton) - { - loadController("Document") - } - - - - @IBAction func doStyle6(_ sender: UIButton) - { - loadController("Document") - } - - - @IBAction func doStyle7(_ sender: UIButton) - { - loadController("Document") - } - - - - func loadController(_ name:String) - { - let destController : UIViewController = self.storyboard!.instantiateViewController(withIdentifier: name) - self.navigationController!.pushViewController(destController, animated: true) - - UIView.animate(withDuration: 0.3, animations: { () -> Void in - self.view.frame = CGRect(x: -UIScreen.main.bounds.size.width, y: 0, width: UIScreen.main.bounds.size.width,height: UIScreen.main.bounds.size.height) - self.view.layoutIfNeeded() - self.view.backgroundColor = UIColor.clear - }, completion: { (finished) -> Void in - self.view.removeFromSuperview() - self.removeFromParentViewController() - }) - } - - - - override func viewDidLoad() - { - super.viewDidLoad() - // Do any additional setup after loading the view. - } - - - - override func didReceiveMemoryWarning() - { - super.didReceiveMemoryWarning() - // Dispose of any resources that can be recreated. - } - - - - override func viewWillAppear(_ animated: Bool) - { - super.viewWillAppear(animated) - } -} diff --git a/ios/LibreOfficeLight/LibreOfficeLight/en.lproj/Main.storyboard b/ios/LibreOfficeLight/LibreOfficeLight/en.lproj/Main.storyboard index 51bf66cbbb53..25d77018d279 100755 --- a/ios/LibreOfficeLight/LibreOfficeLight/en.lproj/Main.storyboard +++ b/ios/LibreOfficeLight/LibreOfficeLight/en.lproj/Main.storyboard @@ -33,9 +33,9 @@ - + - + @@ -81,7 +81,7 @@ - + @@ -267,7 +267,7 @@ - + @@ -347,7 +347,7 @@ - + diff --git a/ios/LibreOfficeLight/LibreOfficeLight/lokit-Bridging-Header.h b/ios/LibreOfficeLight/LibreOfficeLight/lokit-Bridging-Header.h index 2eaf8fed39a6..0ddc877b0233 100644 --- a/ios/LibreOfficeLight/LibreOfficeLight/lokit-Bridging-Header.h +++ b/ios/LibreOfficeLight/LibreOfficeLight/lokit-Bridging-Header.h @@ -6,4 +6,8 @@ // file, You can obtain one at http://mozilla.org/MPL/2.0/. // + + +// LibreOfficeKit is a prelink of all used LO libraries, generated +// as its own xCode project. #import "../LibreOfficeKit/LibreOfficeKit/LibreOfficeKit.h" -- cgit