For the Root.plist
file, you can find out what cells are available to use by default here and here.
EXMRootListController.m
#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.
EXMRootListController.h
header which contains the headers for this view controller.
#include
and #import
is that #include
literally copies the contents of the header into the file, while #import
makes sure to only include the contents of the header once.@implementation
- (NSArray *)specifiers {
_specifiers = [self loadSpecifiersFromPlistName:@"Root" target:self];
_specifiers
to the specifiers which are in the Root.plist
.return _specifiers;
void
(which does not need to return anything).This also allows the developer to make cells manually, you would need to add the specifier manually through PSSpecifier
and then add it to the _specifiers
array.
Linking the preference bundle to the tweak can also be found in my preference bundle examples page: https://github.com/NightwindDev/Preference-Bundle-Example#linking-cells-to-tweak.