美文网首页
iOS 修改tableViewCell上面accessoryVi

iOS 修改tableViewCell上面accessoryVi

作者: 隔墙送来秋千影 | 来源:发表于2018-05-17 17:50 被阅读76次

iOS 在所需要创建的Cell和原生Cell相差不大并且需要accessoryView的图片自定义时,修改tableViewCell上面accessoryView的默认图片及位置

newsCell.accessoryView = ({
   UIImageView *imgV = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"listen_voise"]];
   CGRect frame = imgV.frame;
   frame.size.width = frame.size.width + 10 *SCALE_WIDTH;
   imgV.frame = frame;
   [imgV setContentMode:UIViewContentModeLeft];
   imgV;
});

相关文章

网友评论

      本文标题:iOS 修改tableViewCell上面accessoryVi

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