Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我已经通过故事板创建了一个静态 UITableView,我希望能够通过 UITableViewController .h 和 .m 文件来控制它。一切都在情节提要中设置,但是如何将数据(部分,每个部分中的行数)传输到实现文件中?
如果您想更改代码中界面元素(例如 )的内容或属性,UILabel您UIImageView应该IBOutlets为它们创建并连接它们。 由于这是一个没有动态单元格的静态表,因此没有任何问题。
UILabel
UIImageView
IBOutlets
而且您不需要UITableViewDataSource静态表的方法。只需从实现文件中删除这些方法。
UITableViewDataSource