Files
redpotion/docs/cookbook/table_screens.md
2015-04-26 11:56:45 -07:00

1.8 KiB

There are two types of templates in RedPotion for tables:

  • Metal tables: "Metal" meaning down to the metal. These are standard SDK tables, that are converted into ProMotion screens
  • ProMotion tables: These are easy to use and if you don't have tons of rows they would be a good choice.

Metal tables

To create

potion create table_screen foo

ProMotion tables (Table Screen)

ProMotion::TableScreen allows you to easily create lists or "tables" as iOS calls them. It's a subclass of UITableViewController and has all the goodness of PM::Screen with some additional magic to make the tables work beautifully.

Table Screens Grouped Tables Searchable Refreshable
ProMotion TableScreen Grouped Table Screen Searchable Refreshable

To create

potion create table_screen foo

ProMotion table docs

Add a custom cell

We almost always use custom cells, rather than rely on the default ones provided by the SDK. To create a custom cell (or many different cell types) for your table screen, do this:

potion create table_screen_cell bar_cell

Then follow the directions in the files that were created.