Created
July 14, 2016 03:36
-
-
Save chuck0523/13b00d0ae8b71439966efd2856014f3c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
@UIApplicationMain | |
class AppDelegate: UIResponder, UIApplicationDelegate { | |
var window: UIWindow? | |
private var myTabBarController: UITabBarController! | |
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { | |
window = UIWindow(frame: UIScreen.mainScreen().bounds) | |
let myFirstTab: UIViewController = FirstViewController() | |
let mySecondTab: UIViewController = SecondViewController() | |
let myTabs = NSArray(objects: myFirstTab, mySecondTab) | |
myTabBarController = UITabBarController() | |
myTabBarController?.setViewControllers(myTabs as?[UIViewController], animated: false) | |
self.window!.rootViewController = myTabBarController | |
self.window!.makeKeyAndVisible() | |
return true | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment