-
Notifications
You must be signed in to change notification settings - Fork 12
SKStandardController
Elijah Frederickson edited this page Jun 17, 2014
·
1 revision
This class is wonderful - it simplifies the whole main settings application incredibly simply. To use it, subclass it, like this:
@interface PolluxListController : SKStandardController<SKListControllerProtocol>
Then it creates an enabled switch, a more settings link, a makers link, and a support email dialog button. It assumes localization.
-(NSString*) postNotification;
-(NSString*) defaultsFileName;
-(NSString*) enabledDescription;
These all are options for the enabled
switch.
-(NSArray*) emailAddresses;
-(NSString*) emailBody;
-(NSString*) emailSubject;
These all modify the email options.
-(void) loadSettingsListController;
-(void) loadMakersListController;
These you need to use to load the subpage list controllers.
Example:
ActualSettingsListController *a = [[ActualSettingsListController alloc] init];
[self pushController:a animate:YES];
Where ActualSettingsListController
is any PSListController
or subclass of SKTintedListController
.
And finally:
-(UIColor*) iconColor;
This is used to change the default white color of the icons for the links and switch on the page.