mirror of
https://github.com/zhigang1992/redpotion.git
synced 2026-04-28 20:35:28 +08:00
1.8 KiB
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 |
|---|---|---|---|
![]() |
![]() |
![]() |
![]() |
To create
potion create table_screen foo
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.



