首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 其他教程 > 操作系统 >

ios之Label的创办

2013-02-28 
ios之Label的创建UILabel*label [[UILabelalloc]initWithFrame:CGRectMake(10,100,300,150)]label.text

ios之Label的创建
UILabel*label = [[UILabelalloc]initWithFrame:CGRectMake(10,100,300,150)];label.text= @"Hello world!";//背景颜色为红色label.backgroundColor= [UIColorredColor];//设置字体颜色为白色label.textColor= [UIColorwhiteColor];//文字居中显示label.textAlignment= UITextAlignmentCenter;//自动折行设置label.lineBreakMode= UILineBreakModeWordWrap;label.numberOfLines= 0;//设置字体label.font= [UIFontfontWithName:@"Arial-BoldItalicMT"size:32];
//设置阴影的颜色label.shadowColor = [UIColor blackColor]

热点排行