我的第一个iOS_app-HelloWorld
2015-12-03 本文已影响605人
莫林是个好孩子


点击 Next

选择 目录 -->Next
就看到 如下界面:


代码:
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];
程序 运行结果:
