[英]How to access UITableViewCell from UITableView in different UIViewController?
I have very complex cell in UITableView
within UIViewControllerA
.我在UIViewControllerA
中的UITableView
有非常复杂的单元格。 Now I need to use the same cell within UITableView
of UIViewControllerB
.现在我需要在UIViewControllerB
UITableView
中使用相同的单元格。
registerNib:forCellReuseIdentifier
?它与registerNib:forCellReuseIdentifier
相关吗?You mentioned you don't want to use xib
.你提到你不想使用xib
。 Storyboards don't support this and therefore the last option you have is to construct your UITableViewCell
in code.故事板不支持这一点,因此您的最后一个选择是在代码中构建您的UITableViewCell
。 With the new Auto Layout anchors, it's not that bad.使用新的自动布局锚点,还不错。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.