---
title: "大锐哥的iOS开发教程(3)用代码实现HelloWorld工程"
author: "prevention"
date: "2014-02-03T15:46:42Z"
tags: []
categories: ["移动开发"]
slug: "ios-3-helloworld"
draft: false
lastmod: "2014-02-03T15:46:42Z"
id: 2010846
url: "https://prevention.iteye.com/blog/2010846"
---

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)