Should I use Interface Builder to create Table Cells?
I'm doing a tableview, whose data provider can offer quite a lot of data. There will be an additional Details view for each cell, but I'm thinking that the initial cell could (should) show quite a lot of info, too. Better usability, fancy look & feel, fun to create.
The problem is that it's quite a lot of manual coding to create a cell with this much data. Many places to make errors, slow to finetune coordinates, sizes, colors etc. I know I can use a XIB template, but should I? It will work, not questioning that, but is it a recommended way to use or to avoid?
Loading a Reusable UITableViewCell from a Nib
When l开发者_运维百科ooking at this reusable UITableViewCell XIB question (link also above) it's not clear what is recommended. What is the situation today?
I've never had any trouble doing it either way. As long as you make sure you set the reuse identifier in IB, you should be fine. I don't think there's a clear recommendation as far as which is right, the documentation gives a lot of information on both ways and really doesn't seem to prefer one over the other.
If it just doesn't perform the way you need it to, then you can switch to manually twiddling with contentViews, but since that's a tedious process as you said give it a try with IB first.
If you wanted to go the IB route for something really simple, the answer would be a no, but you seem to have a sophisticated use case so why not use a sophisticated technique?
精彩评论