如何在UITableViewCell中自定义附件公开图像? [英] How can I customize the accessory disclosure image in a UITableViewCell?

查看:45
本文介绍了如何在UITableViewCell中自定义附件公开图像?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在UITableView中使用标准披露附件图像的自定义版本。我怎样才能做到这一点?我希望子类化UITableViewCell对于此基本操作不是必需的。

I would like to use a custom version of the standard disclosure accessory image in my UITableView. How can I do this? I'm hoping that sub-classing UITableViewCell is not necessary for something this basic.

推荐答案

您需要创建一个自定义查看并将其分配给 UITableViewCell 对象的 accessoryView 属性。像这样的东西:

You'll need to create a custom view and assign it to the accessoryView property of the UITableViewCell object. Something like:

myCell.accessoryView = [[ UIImageView alloc ] 
                       initWithImage:[UIImage imageNamed:@"Something" ]];

这篇关于如何在UITableViewCell中自定义附件公开图像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆