General Properties
All components can use the following common properties to add titles, icons, specify where to store settings, etc. Some properties may behave slightly differently per component.
| Key | Type | Description | Condition |
|---|---|---|---|
| cell | string | Component type | – |
| label | string | Display label | Optional, localizable |
| defaults | string | Preferences domain identifier (the name of the settings file/section) | – |
| key | string | Preference key | defaults != nil |
| default | string | Default value | – |
| value | primitive | Current value | Optional |
| icon | string | Icon file name | Optional |
| readonly | boolean | Whether the component is read-only | Optional |
| height | number | Row height | Optional |
cell is the component type, such as Button, Switch, Link, etc.
label is the title, usually displayed on the left.
default is the default value. If value is nil, the default will be used to populate value.
icon is the icon shown to the left of label. If set to res/16.png, you are recommended to also provide res/[email protected] and res/[email protected], whose actual pixel sizes should be 2x and 3x respectively.
readonly if true, makes the value read-only. It cannot be modified, cleared, or link to a sub-page.