美文网首页
为头像添加认证信息

为头像添加认证信息

作者: 回忆宇 | 来源:发表于2017-04-07 14:47 被阅读0次

    简书开篇写一个简单的例子纪念一下!
    最近有一个项目,要显示该用户是否认证过


    head认证.png

    这其实是两个view,底部一个头像view,上面覆盖一个认证信息view。

     UIImageView *headV = [[UIImageView alloc]initWithFrame:CGRectMake(100, 100, 120, 120)];
        headV.image = [UIImage imageNamed:@"systemM"];
        headV.clipsToBounds = YES;
        [self.view addSubview:headV];
        UIImageView *imageV = [[UIImageView alloc]initWithFrame:CGRectMake(-25,5, 85, 30)];
        imageV.image = [UIImage imageNamed:@"ided"];
        CGAffineTransform transform= CGAffineTransformMakeRotation(-M_PI*0.25);
        imageV.transform = transform;
        [headV addSubview:imageV];```
    直接上代码。

    相关文章

      网友评论

          本文标题:为头像添加认证信息

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