UILabel *title = [[UILabelalloc] initWithFrame:CGRectMake(100,7, 120,30)];
解析:
Initializes and returns a newly allocated view object with the specified frame rectangle. |
title.backgroundColor = [UIColorclearColor];
解析:设置背景颜色
title.text = @"选择相册";
解析:设置显示的文字
title.font = [UIFontsystemFontOfSize:20];
解析:设置显示的字体
title.textColor = [UIColorcolorWithWhite:0.4alpha:1.0];
解析:设置显示的文字颜色
title.textAlignment = UITextAlignmentRight;
title.textAlignment = UITextAlignmentCenter;
解析:设置对应的位置
title.highlighted=YES;
title.highlightedTextColor=[UIColor brownColor];
解析:设置高亮
title.shadowColor=[UIColor blueColor];
title.shadowColor=[UIColor blueColor];
//设置文字过长时的显示格式
title.lineBreakMode = UILineBreakModeMiddleTruncation;//截去中间