美文网首页ios开发小技巧
UITableViewCell 上控件设置圆角

UITableViewCell 上控件设置圆角

作者: 纯阳子_ | 来源:发表于2017-07-06 16:19 被阅读29次

自定义UITableViewCell 上面的控件设置圆角 自定义cell的drawRect 方法,并在该方法里面设置圆角

-(void)drawRect:(CGRect)rect {

  [super drawRect:rect];

  self.avada.layer.cornerRadius = self.avada.width * 0.5;
  self.avada.layer.borderColor = [UIColor whiteColor].CGColor;
  self.avada.layer.borderWidth = 2;
  self.avada.layer.masksToBounds =  YES;
}

相关文章

网友评论

    本文标题:UITableViewCell 上控件设置圆角

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