Xcode7 get an Empty application project via single View application

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.