xcode 4.2 hello world

http://www.youtube.com/watch?v=dXvMEGsY700  Saying Hello to World using iOS5 and Xcode 4.2

目标:创建一个iphone应用,一点按钮显示hello。

1.创建一个Single View Application


2.在xib文件中添加2个控件:Label 和 Round Rect Button



3.右键拖动label,划一条线到ViewControl.h,给label起个名字。


4.在ViewControl.h中定义方法showHello,用来改变label的显示。并在ViewControl.m中实现方法。



5.右键单击button,讲Touch Up Inside 和ViewControl.m中的showHello连接,绑定事件的触发。


原文地址:https://www.cnblogs.com/phoenix13suns/p/2326240.html