如何使用xib文件自动布局宽度自定义UITableViewCell

时间:2017-07-31 17:46:43

标签: swift uitableview autolayout

我试图使用xib文件自定义UITableViewCell,我使用AutoLayout但它无法正常工作。我怎么能修好?我试图在谷歌搜索,但没有给我答案。 enter image description here

更新我的代码---- enter image description here

1 个答案:

答案 0 :(得分:1)

您无需在autolayout的contentView上设置UITableViewCell。仅在属性内设置(如SubView,imageView,label等)。您可以在内容视图中添加subView并在其中应用约束并使ContentView透明化。为了实现你的造型。