views:

292

answers:

1

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?

http://stackoverflow.com/questions/413993/loading-a-reusable-uitableviewcell-from-a-nib

When looking at this reusable UITableViewCell XIB question (link also above) it's not clear what is recommended. What is the situation today?

+1  A: 

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?

anq
Ok, then I won't worry about that any more. Done easy and not-so-easy in code, but the next one would take couple hundred lines of code, so IB really is only sensible way. Thanx for advice! It's really good to see encouragement for using IB :)
JOM
IB's not a pancea but it's easier. If it performs then you're fine and you saved time and implementation complexity. I'm part of the optimize-last crowd. Though, there's a lot to be said to atebit's fast scrolling strategy -- problem is, it's a heck of a lot more coding. Happy to help!
anq