美文网首页
UILabel内容第一行的最后边是icon

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

作者: 再也不要见 | 来源:发表于2020-01-17 16:50 被阅读0次

一、效果图 截屏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

      本文链接:https://www.haomeiwen.com/subject/iuthzctx.html