Commit e9d23e09 by Daniel Dahan

updated project examples UIWindow creation

parent f3a049c3
...@@ -38,7 +38,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { ...@@ -38,7 +38,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
// Override point for customization after application launch. // Override point for customization after application launch.
window = UIWindow(frame: MaterialDevice.bounds) window = UIWindow(frame: UIScreen.mainScreen().bounds)
window!.rootViewController = SideNavigationViewController(mainViewController: AppMenuViewController(mainViewController: AppNavigationBarViewController(mainViewController: InboxViewController())), leftViewController: AppLeftViewController(), rightViewController: AppRightViewController()) window!.rootViewController = SideNavigationViewController(mainViewController: AppMenuViewController(mainViewController: AppNavigationBarViewController(mainViewController: InboxViewController())), leftViewController: AppLeftViewController(), rightViewController: AppRightViewController())
window!.makeKeyAndVisible() window!.makeKeyAndVisible()
return true return true
......
...@@ -38,7 +38,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { ...@@ -38,7 +38,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
// Override point for customization after application launch. // Override point for customization after application launch.
window = UIWindow(frame: MaterialDevice.bounds) window = UIWindow(frame: UIScreen.mainScreen().bounds)
window!.rootViewController = ViewController() window!.rootViewController = ViewController()
window!.makeKeyAndVisible() window!.makeKeyAndVisible()
return true return true
......
...@@ -38,7 +38,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { ...@@ -38,7 +38,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
// Override point for customization after application launch. // Override point for customization after application launch.
window = UIWindow(frame: MaterialDevice.bounds) window = UIWindow(frame: UIScreen.mainScreen().bounds)
window!.rootViewController = ViewController() window!.rootViewController = ViewController()
window!.makeKeyAndVisible() window!.makeKeyAndVisible()
return true return true
......
...@@ -38,7 +38,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { ...@@ -38,7 +38,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
// Override point for customization after application launch. // Override point for customization after application launch.
window = UIWindow(frame: MaterialDevice.bounds) window = UIWindow(frame: UIScreen.mainScreen().bounds)
window!.rootViewController = ViewController() window!.rootViewController = ViewController()
window!.makeKeyAndVisible() window!.makeKeyAndVisible()
return true return true
......
...@@ -38,7 +38,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { ...@@ -38,7 +38,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
// Override point for customization after application launch. // Override point for customization after application launch.
window = UIWindow(frame: MaterialDevice.bounds) window = UIWindow(frame: UIScreen.mainScreen().bounds)
window!.rootViewController = ViewController() window!.rootViewController = ViewController()
window!.makeKeyAndVisible() window!.makeKeyAndVisible()
return true return true
......
...@@ -38,7 +38,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { ...@@ -38,7 +38,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
// Override point for customization after application launch. // Override point for customization after application launch.
window = UIWindow(frame: MaterialDevice.bounds) window = UIWindow(frame: UIScreen.mainScreen().bounds)
window!.rootViewController = ViewController() window!.rootViewController = ViewController()
window!.makeKeyAndVisible() window!.makeKeyAndVisible()
return true return true
......
...@@ -38,7 +38,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { ...@@ -38,7 +38,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
// Override point for customization after application launch. // Override point for customization after application launch.
window = UIWindow(frame: MaterialDevice.bounds) window = UIWindow(frame: UIScreen.mainScreen().bounds)
window!.rootViewController = ViewController() window!.rootViewController = ViewController()
window!.makeKeyAndVisible() window!.makeKeyAndVisible()
return true return true
......
...@@ -38,7 +38,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { ...@@ -38,7 +38,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
// Override point for customization after application launch. // Override point for customization after application launch.
window = UIWindow(frame: MaterialDevice.bounds) window = UIWindow(frame: UIScreen.mainScreen().bounds)
window!.rootViewController = ViewController() window!.rootViewController = ViewController()
window!.makeKeyAndVisible() window!.makeKeyAndVisible()
return true return true
......
...@@ -38,7 +38,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { ...@@ -38,7 +38,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
// Override point for customization after application launch. // Override point for customization after application launch.
window = UIWindow(frame: MaterialDevice.bounds) window = UIWindow(frame: UIScreen.mainScreen().bounds)
window!.rootViewController = ViewController() window!.rootViewController = ViewController()
window!.makeKeyAndVisible() window!.makeKeyAndVisible()
return true return true
......
...@@ -38,7 +38,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { ...@@ -38,7 +38,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
// Override point for customization after application launch. // Override point for customization after application launch.
window = UIWindow(frame: MaterialDevice.bounds) window = UIWindow(frame: UIScreen.mainScreen().bounds)
window!.rootViewController = ViewController() window!.rootViewController = ViewController()
window!.makeKeyAndVisible() window!.makeKeyAndVisible()
return true return true
......
...@@ -38,7 +38,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { ...@@ -38,7 +38,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
// Override point for customization after application launch. // Override point for customization after application launch.
window = UIWindow(frame: MaterialDevice.bounds) window = UIWindow(frame: UIScreen.mainScreen().bounds)
window!.rootViewController = ViewController() window!.rootViewController = ViewController()
window!.makeKeyAndVisible() window!.makeKeyAndVisible()
return true return true
......
...@@ -38,7 +38,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { ...@@ -38,7 +38,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
// Override point for customization after application launch. // Override point for customization after application launch.
window = UIWindow(frame: MaterialDevice.bounds) window = UIWindow(frame: UIScreen.mainScreen().bounds)
window!.rootViewController = ViewController() window!.rootViewController = ViewController()
window!.makeKeyAndVisible() window!.makeKeyAndVisible()
return true return true
......
...@@ -38,7 +38,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { ...@@ -38,7 +38,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
// Override point for customization after application launch. // Override point for customization after application launch.
window = UIWindow(frame: MaterialDevice.bounds) window = UIWindow(frame: UIScreen.mainScreen().bounds)
window!.rootViewController = ViewController() window!.rootViewController = ViewController()
window!.makeKeyAndVisible() window!.makeKeyAndVisible()
return true return true
......
...@@ -38,7 +38,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { ...@@ -38,7 +38,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
// Override point for customization after application launch. // Override point for customization after application launch.
window = UIWindow(frame: MaterialDevice.bounds) window = UIWindow(frame: UIScreen.mainScreen().bounds)
window!.rootViewController = AppMenuViewController(mainViewController: YellowViewController()) window!.rootViewController = AppMenuViewController(mainViewController: YellowViewController())
window!.makeKeyAndVisible() window!.makeKeyAndVisible()
return true return true
......
...@@ -37,7 +37,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { ...@@ -37,7 +37,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
// Override point for customization after application launch. // Override point for customization after application launch.
window = UIWindow(frame: MaterialDevice.bounds) window = UIWindow(frame: UIScreen.mainScreen().bounds)
window!.rootViewController = ViewController() window!.rootViewController = ViewController()
window!.makeKeyAndVisible() window!.makeKeyAndVisible()
return true return true
......
...@@ -38,7 +38,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { ...@@ -38,7 +38,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
// Override point for customization after application launch. // Override point for customization after application launch.
window = UIWindow(frame: MaterialDevice.bounds) window = UIWindow(frame: UIScreen.mainScreen().bounds)
window!.rootViewController = AppNavigationBarViewController(mainViewController: YellowViewController()) window!.rootViewController = AppNavigationBarViewController(mainViewController: YellowViewController())
window!.makeKeyAndVisible() window!.makeKeyAndVisible()
return true return true
......
...@@ -38,7 +38,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { ...@@ -38,7 +38,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
// Override point for customization after application launch. // Override point for customization after application launch.
window = UIWindow(frame: MaterialDevice.bounds) window = UIWindow(frame: UIScreen.mainScreen().bounds)
window!.rootViewController = AppSearchBarViewController(mainViewController: YellowViewController()) window!.rootViewController = AppSearchBarViewController(mainViewController: YellowViewController())
window!.makeKeyAndVisible() window!.makeKeyAndVisible()
return true return true
......
...@@ -38,7 +38,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { ...@@ -38,7 +38,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
// Override point for customization after application launch. // Override point for customization after application launch.
window = UIWindow(frame: MaterialDevice.bounds) window = UIWindow(frame: UIScreen.mainScreen().bounds)
window!.rootViewController = SideNavigationViewController(mainViewController: YellowViewController(), leftViewController: GreenViewController(), rightViewController: BlueViewController()) window!.rootViewController = SideNavigationViewController(mainViewController: YellowViewController(), leftViewController: GreenViewController(), rightViewController: BlueViewController())
window!.makeKeyAndVisible() window!.makeKeyAndVisible()
return true return true
......
...@@ -38,7 +38,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { ...@@ -38,7 +38,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
// Override point for customization after application launch. // Override point for customization after application launch.
window = UIWindow(frame: MaterialDevice.bounds) window = UIWindow(frame: UIScreen.mainScreen().bounds)
window!.rootViewController = ViewController() window!.rootViewController = ViewController()
window!.makeKeyAndVisible() window!.makeKeyAndVisible()
return true return true
......
...@@ -38,7 +38,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { ...@@ -38,7 +38,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
// Override point for customization after application launch. // Override point for customization after application launch.
window = UIWindow(frame: MaterialDevice.bounds) window = UIWindow(frame: UIScreen.mainScreen().bounds)
window!.rootViewController = ViewController() window!.rootViewController = ViewController()
window!.makeKeyAndVisible() window!.makeKeyAndVisible()
return true return true
......
...@@ -38,7 +38,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { ...@@ -38,7 +38,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
// Override point for customization after application launch. // Override point for customization after application launch.
window = UIWindow(frame: MaterialDevice.bounds) window = UIWindow(frame: UIScreen.mainScreen().bounds)
window!.rootViewController = ViewController() window!.rootViewController = ViewController()
window!.makeKeyAndVisible() window!.makeKeyAndVisible()
return true return true
......
...@@ -44,7 +44,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { ...@@ -44,7 +44,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
let sideViewController = storyboard.instantiateViewControllerWithIdentifier("SideViewController") as! SideViewController let sideViewController = storyboard.instantiateViewControllerWithIdentifier("SideViewController") as! SideViewController
// Configure the window with the SideNavigationViewController as the root view controller // Configure the window with the SideNavigationViewController as the root view controller
window = UIWindow(frame: MaterialDevice.bounds) window = UIWindow(frame: UIScreen.mainScreen().bounds)
window?.rootViewController = SideNavigationViewController(mainViewController: mainViewController, leftViewController: sideViewController) window?.rootViewController = SideNavigationViewController(mainViewController: mainViewController, leftViewController: sideViewController)
window?.makeKeyAndVisible() window?.makeKeyAndVisible()
return true return true
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment