标准附件视图可以在UITableViewCell内的不同位置吗? [英] Can a standard accessory view be in a different position within a UITableViewCell?

查看:85
本文介绍了标准附件视图可以在UITableViewCell内的不同位置吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望我的配件与正常情况下的位置略有不同.是否有可能? 这段代码无效:

I want my accessory to be in a slightly different place than normal. Is it possible? This code has no effect:

cell.accessoryType =  UITableViewCellAccessoryDisclosureIndicator;
cell.accessoryView.frame = CGRectMake(5.0, 5.0, 5.0, 5.0);

推荐答案

否,您不能移动附件视图的位置.或者,您可以添加如下所示的子视图;

No, you cannot move where the accessory view is. As an alternative you can add a subview like the following;

[cell.contentView addSubview:aView];

此外,通过将accessoryView属性设置为相等,accessoryType值将被忽略.

Also, by setting the accessoryView property equal to something, the accessoryType value is ignored.

这篇关于标准附件视图可以在UITableViewCell内的不同位置吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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