Sometimes, I want to create really simple UITableViews. For instance, I want to create a view that look like this one : http://blogs.remobjects.com/wp-content/uploads/2011/10/DatePicker-in-action.png
In those circumstances, I feel that it would be better to hardcode my UITableViewCell in InterfaceBuilder instead of creating them dynamically in my tableview events. This way, I would not pollute my class with too much code.
The problem is that the Interface Builder won’t let me put a UITableViewCell inside a UITableView. So, is there a way to archive what I want to do, or is it only a bad practice that I should avoid to do?
Of course you can do that! Just use storyboard, choose a table view with static cells and create cells at your heart’s content. Style them any way you like and pre-fill them with the data you wish.
And yes, it is very good practice to do as much as is feasible in Interface Builder to reduce the code of your classes!