Checkmark在UITableVIewCell

时间:2017-06-07 14:46:03

标签: ios iphone swift swift3

我正在构建一个过滤器视图控制器。 顶部是一个可选列表,选择标记为选中标记。

我的问题是复选标记将我的textlabel推向左侧。 UITextLabel从右到左对齐。

enter image description here

如何通过推送textlabel来禁用复选标记,以便它可以像iphone中的铃声选择viewController一样工作(例如)

enter image description here

1 个答案:

答案 0 :(得分:0)

您必须手动处理复选标记,在UIImage左侧添加UITableViewCell而不使用accessoryType,因为它只显示在右侧:https://developer.apple.com/documentation/uikit/uitableviewcell/1623228-accessorytype

但是,如果您仍想使用accessoryType,可以在UILabel的右侧提供更多空间。