(I found a missing semicolon somewhere and this seemed like the best place for it.) |
m (Move the occlass template down to the bottom, include the navbox.) |
||
Line 1: | Line 1: | ||
'''PSListController''' is a class that represents a list of preferences in a table. It supports loading [[PSSpecifier|specifiers]] from a property list (specified at runtime). | '''PSListController''' is a class that represents a list of preferences in a table. It supports loading [[PSSpecifier|specifiers]] from a property list (specified at runtime). | ||
Line 17: | Line 16: | ||
@end | @end | ||
</source> | </source> | ||
{{occlass|library=Preferences.framework|navbox=1}} |
Revision as of 20:08, 5 February 2012
PSListController is a class that represents a list of preferences in a table. It supports loading specifiers from a property list (specified at runtime).
Subclassing
This is a simple PSListController subclass that does not offer localization. The only message strictly required is -specifiers.
@interface MyListController : PSListController
@end
@implementation MyListController
- (id)specifiers {
if(_specifiers == nil) {
// Loads specifiers from Name.plist from the bundle we're a part of.
_specifiers = [[self loadSpecifiersFromPlistName:@"Name" target:self] retain];
}
return _specifiers;
}
@end
|