
打开Xcode,选择第二项:Create a new Xcode project

选择 Single View Application
点击 Next

填写好 点击 Next
选择 目录 -->Next
就看到 如下界面:

这就是 Xcode 平时写代码的 界面了

输入 图中代码 快捷键 cmd + R 运行程序
代码:
UILabel*label = [[UILabelalloc]initWithFrame:CGRectMake(100,100,200,100)];
label.text=@"hello world !";
label.font= [UIFontsystemFontOfSize:22];
label.textAlignment=NSTextAlignmentCenter;
label.textColor= [UIColorcyanColor];
label.backgroundColor= [UIColorredColor];
[self.viewaddSubview:label];
程序 运行结果:
