-
Notifications
You must be signed in to change notification settings - Fork 5
Basic Usage
Conor edited this page Jun 18, 2020
·
3 revisions
This page contains the basic usage of libappearancecell, and an example specifier to use in your projects
The main class of libappearancecell is AppearanceSelectionTableCell
, this handles everything related to the cell
<dict>
<key>cell</key>
<string>PSDefaultCell</string>
<key>cellClass</key>
<string>AppearanceSelectionTableCell</string>
<key>options</key>
<array>
<dict>
<key>text</key>
<string>Light</string>
<key>image</key>
<string>light</string>
</dict>
<dict>
<key>text</key>
<string>Dark</string>
<key>image</key>
<string>dark</string>
</dict>
</array>
<key>defaults</key>
<string>me.conorthedev.libappearancecell.demo</string>
<key>PostNotification</key>
<string>me.conorthedev.libappearancecell.demo/reload</string>
<key>key</key>
<string>appearance</string>
<key>height</key>
<integer>210</integer>
</dict>
Key | Type | Description | Required? |
---|---|---|---|
options | Array | An array of options that shows on the cell, contains dictionaries | YES |
defaults | String | The preferences identifier where you want libappearancecell to save values | YES |
PostNotification | String | A post notification to send once the value is written to the Preferences | NO |
key | String | The key which you want to save the selected option under, when accessing it from an NSDictionary it is an integer | YES |
height | Integer | Defines the default height of the cell, this must always be 210 | YES |
Key | Type | Description | Required? |
---|---|---|---|
text | String | The display name of the option | YES |
image | String | The name of the image you want displayed on the option | YES |
Key | Type | Description |
---|---|---|
tintColor | String | A colour defined in hex that will be applied to the checkmark image |