UILabel内容第一行的最后边是icon

一、效果图
截屏2020-01-17下午4.45.10.png

UILabel *labicon = [[UILabel alloc]initWithFrame:CGRectMake(0,100, 50, 20)]; labicon.backgroundColor = [UIColor redColor];
labicon.text = @"天猫";
labicon.textColor = [UIColor greenColor];
 labicon.font = [UIFont systemFontOfSize:11];
UILabel *labicon_txt = [[UILabel alloc]initWithFrame:CGRectMake(0, 100, kScreenWidth, 40)];
      labicon_txt.backgroundColor = [UIColor whiteColor];
      labicon_txt.text = @"\t\t欧美风复古拼接水洗牛衣秋装休闲夹...克衫潮流欧美风复古拼接水洗牛衣秋装休闲夹...克衫潮流欧美风复古拼接水洗牛衣秋装休闲夹...克衫潮流";
        labicon_txt.numberOfLines = 0;
      labicon_txt.textColor = [UIColor redColor];
      labicon_txt.font = [UIFont systemFontOfSize:13];
      [self.view addSubview:labicon_txt];
    [self.view addSubview:labicon];

你可能感兴趣的:(UILabel内容第一行的最后边是icon)