左侧的iOS UITableViewCell配件? [英] iOS UITableViewCell accessory on the left side?
问题描述
对于我的应用,我想要一些可以同时具有复选标记和详细信息披露按钮的单元格。也就是说,我希望它们看起来与iOS设置中的Wi-Fi网络选择完全相同:左侧是复选标记,中间是内容,右侧是详细信息披露按钮。
For my app, I want a number of cells that can have both a checkmark and a detail disclosure button. That is, I want them to appear exactly like the Wi-Fi network selection in the iOS settings: checkmark on the left side, content in the middle, and detail disclosure button on the right.
是否有正确的方法来执行此操作,或者我应该只在单元格内容的图像部分使用复选标记的图像?如果您知道有任何示例代码执行此类操作,请指出。
Is there a proper way to do this, or am I supposed to just use an image of a checkmark in the image part of the cell content? If you know of any sample code doing this sort of thing, please point me to it.
推荐答案
UITableViewCell的标准样式不包括一个可以按你的方式工作的,所以你必须自己手动将子视图添加到单元格中。
The standard styles for UITableViewCell do not include one that works as you want, so you'll have to do this yourself by manually adding a subview to the cell.
你可以使用这里的示例作为起点。
这篇关于左侧的iOS UITableViewCell配件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!