forked from jxd001/Swift-ZhihuDaily
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAppDelegate.swift
36 lines (26 loc) · 1.29 KB
/
AppDelegate.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
//
// AppDelegate.swift
// testSwift
//
// Created by XuDong Jin on 14-6-10.
// Copyright (c) 2014年 XuDong Jin. All rights reserved.
//
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool {
self.window = UIWindow(frame: UIScreen.mainScreen().bounds)
// Override point for customization after application launch.
let homeCtrl = HomeViewController(nibName:"HomeViewController",bundle:nil)
let homeNav = UINavigationController(rootViewController:homeCtrl)
homeNav.navigationBar.tintColor = UIColor.whiteColor()
homeNav.navigationBar.barTintColor = UIColor(red: 0/255.0, green: 176/255.0, blue: 232/255.0, alpha: 1.0)
let titleAttr:NSDictionary = NSDictionary(object:UIColor.whiteColor(),forKey:NSForegroundColorAttributeName)
homeNav.navigationBar.titleTextAttributes = titleAttr as? [String : AnyObject]
self.window!.rootViewController = homeNav
self.window!.backgroundColor = UIColor.whiteColor()
self.window!.makeKeyAndVisible()
return true
}
}