Method: Create an Empty Application project
The following is a detailed look at a single View application project to get an Empty application project method:
1. First create a single View application project, which is described in the swift language project as an example:
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:
- Create window
- Set window background
- Set window's root controller
- Set visible
Objective-c:
Self.window = [[initwithframe:[[uiscreen mainscreen] bounds]]; Self.window.backgroundColor = [uicolor whitecolor]; Self.window.rootViewController = [[uiviewcontroller alloc]init];[ Self.window makekeyandvisible];
Swift:
UIWindow (uiscreen.mainscreen (). Bounds)Uicolor.whitecolor ()uiviewcontroller () Self.window?. Makekeyandvisible ()
Xcode7 get an Empty application project via single View application