---
title: "iOS Dev (2) HelloWorld with .xib"
author: "prevention"
date: "2013-07-14T13:29:00Z"
tags: []
slug: "ios-dev-2-helloworld-with-xib"
draft: false
lastmod: "2014-02-03T16:56:28Z"
id: 2010902
url: "https://prevention.iteye.com/blog/2010902"
---

**iOS Dev (2) HelloWorld with .xib**

- 作者：爱欧艾斯鸟

**创建工程**

- Cmd + Shift + N
  
  - 选择 Single View Application；

**填写options**

- Class Prefix可以填HelloWorld
- Product Name也可以填HelloWorld
- company.identifier填com.xxx
- Devices选iPhone
- Use Storyboards、User Automatic Reference Counting、Include Unit Tests不选

**看下项目结构**

- HelloWorldAppDelegate是代理类
- HelloWorldViewController是视图控制器类
- Supporting Files一般用于存放资源文件
  
  - InfoPlist 应用程序国际化会用到，包含多国语言的翻译
  - main.m 是入口函数
  - HelloWorld-Info.plist 包含工程信息的属性列表
- Frameworks 引入的系统框架，默认会引入：
  
  - UIKit.framework: UI组件库
  - Foundation.framework: 基础类库
  - CoreGraphics.framework: 2D绘图类库

**HelloWorld**

从右下角的拖动一个 Label 组件到 HelloWorldViewController.xib 上，写上 Hello World。

**Run it!**

(完)