最新消息:20210816 当前crifan.com域名已被污染,为防止失联,请关注(页面右下角的)公众号

[记录]用swift实现TableView中添加用户头像和右边显示时间

Swift crifan 2490浏览 0评论

想要实现,类似于微信的 消息界面中

tableView

左边是用户头像,加上 header和subtitle,

右边,上面是时间,下面是是否静音的图标

weixin right side silent

 

先去:

Swift中的UITableView中cell左边显示图片头像

搜:

swift tableview image

参考:

uitableview – Adding an Image into a cell – Stack Overflow

ios – How to add custom imageview in tableview cell in Swift? – Stack Overflow

最后试试:

cell.imageView?.image = UIImage(named:"add_white_24x24.png")

然后可以显示头像了:

set image value of table view cell show

 

再去:

[已解决]Swift中的UITableView中自定义UITableViewCellAccessoryType

转载请注明:在路上 » [记录]用swift实现TableView中添加用户头像和右边显示时间

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
84 queries in 0.168 seconds, using 22.12MB memory