UILabel *headLabel = [[UILabel alloc]initWithFrame:CGRectMake(190, 20, 100, 40)];
headLabel.text = @"客户登录";
headLabel.textAlignment = UITextAlignmentCenter;
// headLabel.font = [UIFont boldSystemFontOfSize:22];
headLabel.font = [UIFont fontWithName:@"Arial" size:25];
headLabel.textColor = [UIColor blackColor];
headLabel.adjustsFontSizeToFitWidth = YES;
headLabel.numberOfLines = 1;
headLabel.backgroundColor = [UIColor clearColor];
headLabel.highlighted = YES;
headLabel.highlightedTextColor = [UIColor blackColor];
headLabel.shadowColor = [UIColor grayColor];
headLabel.shadowOffset = CGSizeMake(1.0, 1.0);
headLabel.userInteractionEnabled = YES;
headLabel.enabled = YES;
headLabel.lineBreakMode = UILineBreakModeHeadTruncation;
headLabel.baselineAdjustment = UIBaselineAdjustmentAlignCenters;UILabel基本代码
最新推荐文章于 2025-06-18 11:05:26 发布
本文详细介绍如何使用UILabel控件,并展示了如何设置其属性以实现特定显示效果。包括文本内容、字体大小、颜色、阴影等参数的配置。
1804

被折叠的 条评论
为什么被折叠?



