For the Root.plist
file, you can find out what cells are available to use by default here and here.
#include "EXMRootListController.h" // better to change to #import
@implementation EXMRootListController
- (NSArray *)specifiers {
if (!_specifiers) {
_specifiers = [self loadSpecifiersFromPlistName:@"Root" target:self];
}
return _specifiers;
}
@end
This is the code of the view controller that displays when the user opens up the tweak settings page.
Let's go through it one by one.
- It is including (not importing! See the difference between
#include
and#import
here.)EXMRootListController.h
which contains the headers for this view controller. @implementation
- This implements the view controller, basically allowing the developer to add methods and write the code in the view controller.
- (NSArray *)specifiers {
- This is the method holding all of the specifiers, i.e. the cells in the view controller.
_specifiers = [self loadSpecifiersFromPlistName:@"Root" target:self];
- This line sets
_specifiers
to the specifiers which are in theRoot.plist
.
- This line sets
return _specifiers;
- This returns the specifiers because that is needed as the method is not of the type
void
(which does not need to return anything).
- This returns the specifiers because that is needed as the method is not of the type
This also allows the developer to make cells manually, it is not that difficult, you just need to add the specifier manually through PSSpecifier
and then add it to the _specifiers
array.
- Further information about this can be found near the bottom of https://iphonedev.wiki/index.php/Preferences_specifier_plist.
Linking the preference bundle to the tweak can also be found in my preference bundle examples page: https://github.com/NightwindDev/Preference-Bundle-Example.