【发布时间】:2015-07-16 23:33:16
【问题描述】:
我创建了第一个 Swift 应用,在 AppDelegate 函数中设置了一个 viewController:
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
var tableVC:FriendsTableViewController = FriendsTableViewController(className: "Friend")
tableVC.title = "FriendFamz"
UINavigationBar.appearance().tintColor = UIColor(red: 0.05, green: 0.47, blue: 0.91, alpha: 1.0)
UINavigationBar.appearance().barTintColor = UIColor(red: 0.05, green: 0.47, blue: 0.91, alpha: 1.0)
UINavigationBar.appearance().titleTextAttributes = [NSForegroundColorAttributeName: UIColor.whiteColor()]
UIApplication.sharedApplication().statusBarStyle = UIStatusBarStyle.LightContent
var navigationVC:UINavigationController = UINavigationController(rootViewController: tableVC)
let frame = UIScreen.mainScreen().bounds
window = UIWindow(frame: frame)
window!.rootViewController = navigationVC
window!.makeKeyAndVisible()
现在我想更改应用程序的第一个视图:我想创建一个登录视图(带有登录 ViewController),但我不知道如何创建这个视图,然后调用我的 FriendTableViewController ...
有人可以帮忙吗?太好了,我已经被屏蔽了好几个小时了... 非常感谢
【问题讨论】:
标签: ios iphone swift viewcontroller appdelegate