As long as anyone can read in the Apple documentation, as ios developer we should be aware of memory leaks and allocations. While developing an iphone app, there is one question that comes to my mind. How and why would you take the decision of using static cells over dynamic prototypes.
What are the pros and cons you’ve found about both ways. Is there any way to dequeue static cells?? What would you do, let’s say if you had 6/7 cells in a tableview with relatively static data. Like for instance a settings tvc.
Looking forward your comments to proceed accordingly
Thanks
When using static cells, you are deferring “dequeuing cells” and other data-binding to the base UITableViewController class. You should delete all the tableview and tableviewdatasource delegate method implementations in your TVC when using static cells. It may be possible to manually dequeue and add rows to a table that has static cells, but I’ve never attempted it; if you know that will be necessary you’re best to go the dynamic cell route.
Static cells are convenient when you want to pivot an object so that each property is a row in your table. For those cases, your data isn’t easily represented as a array of values. In this case, the count of rows in the TV is known ahead of time, and the template for each cell is static – just like a settings TVC that you mention in your question. It’s still possible to use KVO etc to present your data as a dictionary when the class you are binding too supports it and go the dynamic cell route anyways, but it may be simpler/faster to develop using static cells.