`
lgl903
  • 浏览: 15376 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

[IOS]自定义TableViewCell分割线和右剪头

    博客分类:
  • IOS
 
阅读更多

    UIView *line = [[UIViewalloc] init];

    line.frame = CGRectMake(0, cell.frame.size.height, SCREEN_WIDTH, 1);

    line.backgroundColorTABLE_CELL_LINE_COLOR;

    [cell.contentViewaddSubview:line];

 

 

 

    UIImageView *arrowView=[[UIImageViewalloc] init];

    arrowView.translatesAutoresizingMaskIntoConstraints=NO;

    arrowView.image=[UIImageimageNamed:@"setting_arrow"];

    [cell.contentViewaddSubview:arrowView];

    

    [cell.contentViewaddConstraints:[NSLayoutConstraintconstraintsWithVisualFormat:@"V:[arrowView(15)]-15-|"options:0metrics:nilviews:NSDictionaryOfVariableBindings(arrowView)]];

 

    [cell.contentViewaddConstraints:[NSLayoutConstraintconstraintsWithVisualFormat:@"H:[arrowView(10)]-20-|"options:0metrics:nilviews:NSDictionaryOfVariableBindings(arrowView)]];

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics