---
title: "iOS dev (9) 创建一个空白的界面"
author: "prevention"
date: "2014-01-01T03:58:00Z"
tags: []
slug: "ios-dev-9"
draft: false
lastmod: "2014-02-03T16:56:23Z"
id: 2010886
url: "https://prevention.iteye.com/blog/2010886"
---

# iOS dev (9) 创建一个空白的界面

- 作者：CSDN 大锐哥
- 地址：[http://blog.csdn.net/prevention](http://blog.csdn.net/prevention)

## 创建一个 Empty App

略

## AppDelegate

```
#import <UIKit/UIKit.h>

@interface AppDelegate : UIResponder<UIApplicationDelegate>

@property (strong, nonatomic) UIWindow *window;

@end
```

## 创建空白界面

```
#import "AppDelegate.h"

@implementation AppDelegate

- (BOOL) application: (UIApplication *)application didFinishLaunchingWithOptions: (NSDictionary *)launchOptions
{
    self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
    self.window.backgroundColor = [UIColor redColor];
    [self.window makeKeyAndVisible];
    return YES;
}

@end
```