现在的位置: 首页 > 综合 > 正文

UILabel 基本使用

2013年12月12日 ⁄ 综合 ⁄ 共 440字 ⁄ 字号 评论关闭

越努力.越幸福.----willingseal.

 UILabel *headText = [[UILabel
alloc]initWithFrame:CGRectMake(300,
0, 168,
80
)];

    headText.text =
@"font字体";

    headText.textAlignment
UITextAlignmentCenter;//居中对齐

    headText.numberOfLines =
0;

    headText.font = [UIFont
fontWithName:@"Snell Roundhand"
size:18];//设置字体和大小

    headText.textColor = [UIColor
blueColor];//设置字体颜色

    headText.backgroundColor = [UIColor
clearColor];//设置label背景颜色

    [headerView
addSubview:headText];

    [headText
release];

    

抱歉!评论已关闭.