Ale*_*one 3 objective-c uitableview ios
我已成功地使用registerNib在XIB中定义UITableViewCell的UI,其中只有一个UITableViewCell原型.
为了封装,是否可以在其中安装带有多个UITableViewCell的XIB,并且仍然能够使用registerNib加载正确的单元?
如果是这样,如何在代码中识别XIB中所需的单元原型?
我目前正在tableView的VDL中这样做,工作正常:
[self.tableView registerNib:[UINib nibWithNibName:@"LogoCell" bundle:[NSBundle mainBundle]]
forCellReuseIdentifier:CellId];
Run Code Online (Sandbox Code Playgroud)
有没有办法指定我们想要使用的XIB中的哪个单元原型?
提前致谢.
In the interest of encapsulation, would it be possible to have an XIB with more than one UITableViewCell in it and still be able to load the proper cell using registerNib?
Run Code Online (Sandbox Code Playgroud)
没有.
| 归档时间: |
|
| 查看次数: |
1170 次 |
| 最近记录: |