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

**iOS Dev (3) HelloWorld with codes**

- 作者：爱欧艾斯鸟

**删除**

- 删除 HelloWorldViewController.xib文件
- 删除 HelloWorldViewController.m 中的 viewDidLoad

**添加**

- 添加 loadView 到 HelloWorldViewController.m  
  \- (void)loadView
- {
- UIView \*view =
- \[\[UIView alloc] initWithFrame: \[UIScreen mainScreen].applicationFrame];
- self.view = view;
- UILabel \*label2 = \[\[UILabel alloc] initWithFrame: CGRectMake(0, 110, 150, 100)];
- label2.text = @"Hello World 2";
- \[self.view addSubview: label2];
- \[label2 release];
- }
- UIScreen: UIKit.framework component;
- UILabel: UIKit.framework component;
- CGRectMake: CoreGraphics.framework component;

**Run it!**

(THE END)