Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the difference between static cells and dynamic prototypes?

I want to know the difference between making the cells in my UITableView "Static Cells" or choosing "Dynamic Prototypes".

If I want to make a UITableView that has a "+" button to add cells (like Contacts App or Clock when setting an alarm). Which one should I choose?

like image 737
tomidelucca Avatar asked Dec 27 '11 06:12

tomidelucca


People also ask

What is static and dynamic prototype?

In my work, I tend to use two kinds of prototypes: Static (or “tappable”) prototypes. These help to explore, explain, and test user flow concepts pretty quickly. They take anywhere from 5 minutes to an hour to create, and. Dynamic (or “animation study”) prototypes.

What are dynamic prototypes?

A dynamic prototype is a final product simulation, a demo that allows you to visualize an idea and to interact with its functionality. Our prototypes can have several levels of complexity, from a few interactions to complex mathematical calculations and dynamic content creation.

What is static cell?

In static cell culture, the culture medium is supplied in a batch-wise manner, and is replaced by fresh medium manually in regular intervals.


1 Answers

Static cells are basically a "what you see is what you get" in Interface Builder. What you put into the UITableView is what you'll see when you run the app.

Dynamic prototypes, instead, allow you to lay out cells that you can re-use by calling:

UITableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:CELL_ID_SET_IN_IB]; 

With this, you determine the number of cells using the delegate methods in the UITableViewController. You can have multiple prototype cells and determine which to load depending on index path.

You can use segues with both.

I would recommend prototypes for your app since it seems like, from your question, the number of cells you have will change.

like image 109
Philippe Sabourin Avatar answered Sep 24 '22 20:09

Philippe Sabourin