Using alloc/init or loading a nib are orthogonal methods for creating objects. Use one or the other. If you load a nib you get one of each of the objects that are freeze-dried in that nib. If you need more than one you need to load the nib again, and again.
It's possible that you could create a nib that holds a single instance of a UITableViewCell subclass and then load that nib many times using the apis in UINibLoading.h. If you like that method then it should work fine. I agree that laying out a UI in code is so 20th century.
Having said that, I generate my UITableViewCells in code. You seem to be mixing these two strategies with no good results. Give that up. One or the other.
|