2015年12月22日 星期二

用xib換掉storyboard

一、先到info.plist中把Main storyboard file base name這個tag拿掉

二、再到appDelegate的didFinishLaunchingWithOptions中加入rootViewController
例如
let navigationVC: UINavigationController = UINavigationController(rootViewController: yourViewController)
        
let frame = UIScreen.mainScreen().bounds
window = UIWindow(frame: frame)
        
window!.rootViewController = navigationVC
window!.makeKeyAndVisible()

沒有留言:

張貼留言