Original post: Http://featherj.org/?p=252&utm_source=tuicool&utm_medium=referral Create an Empty application project to Swift Example of a language project: 1. First create a single View application project to remove the Main.storyboard and Viewcontroller.swift files from the project directory.
2. Open the Info.plist and delete the Main storyboard file base name (click the minus sign next to it).
3. Open the project properties file to see if the contents of Main Interface in Deployment Info are empty, or delete it if not.
4. Finally, add the code in the first method inside the appdelegate, and the code is divided into 4 parts, namely:
Oc:
1 self.window = [[UIWindow alloc] Initwithframe:[[uiscreen mainscreen] bounds]];//Create window2 self.window.backgroundColor = [uicolor whitecolor];//Set window background 3 Self.window.rootViewController = [[Uiviewcontroller alloc]init];//Set Window's root controller 4 [Self.window makekeyandvisible];//Settings visible
Swift
1 self.window = UIWindow (Frame:UIScreen.mainScreen (). Bounds)2 self.window?. BackgroundColor = Uicolor.whitecolor ()3 Self.window?. Rootviewcontroller = Uiviewcontroller ()4 Self.window?. Makekeyandvisible ()
Xcode 7 Create an EMPTY application project