CepheiPrefs — List Controllers

  • The HBAboutListController class in CepheiPrefs provides a list controller with functions that would typically be used on an about page. It includes two class methods you can override to provide a developer website and donation URL, and a class method to provide an email address so the user can send the developer an email right from the tweak’s settings.

    There is a sample of an HBAboutListController implemented in the Cephei demo preferences. See the Cephei readme for details.

    Example Usage

    <dict>
        <key>cell</key>
        <string>PSLinkCell</string>
        <key>cellClass</key>
        <string>HBLinkTableCell</string>
        <key>label</key>
        <string>Visit Website</string>
        <key>url</key>
        <string>https://hbang.ws/</string>
    </dict>
    <dict>
        <key>cell</key>
        <string>PSGroupCell</string>
        <key>label</key>
        <string>Experiencing issues?</string>
    </dict>
    <dict>
        <key>action</key>
        <string>hb_sendSupportEmail</string>
        <key>cell</key>
        <string>PSLinkCell</string>
        <key>label</key>
        <string>Email Support</string>
    </dict>
    <dict>
        <key>cell</key>
        <string>PSGroupCell</string>
        <key>footerText</key>
        <string>If you like this tweak, please consider a donation.</string>
    </dict>
    <dict>
        <key>cell</key>
        <string>PSLinkCell</string>
        <key>cellClass</key>
        <string>HBLinkTableCell</string>
        <key>label</key>
        <string>Donate</string>
        <key>url</key>
        <string>https://hbang.ws/donate/</string>
    </dict>
    
    See more

    Declaration

    Objective-C

    @interface HBAboutListController : HBListController

    Swift

    class HBAboutListController : HBListController
  • The HBListController class in CepheiPrefs provides a list controller with various conveniences such as a unique tint color for the list controllers within a preference bundle, and bug fixes for common issues within the Settings app and Preferences framework. In particular, a bug with the list controller’s content disappearing after closing the Settings app and opening it again is worked around, as well as an issue on iOS 7 where in some cases a cell may stay highlighted after being tapped.

    It includes two class methods you can override to return the name of a Preferences specifier property list, and various methods to set custom colors in the list controller interface.

    See more

    Declaration

    Objective-C

    @interface HBListController : PSListController

    Swift

    class HBListController : PSListController
  • The HBRootListController class in CepheiPrefs provides a list controller class that should be used as the root of the package’s settings. It includes two class methods you can override to provide a default message and a URL that the user can share via a sharing button displayed to the right of the navigation bar.

    It is recommended that you use this class even if its current features aren’t appealing in case of future improvements or code that relies on the presence of an HBRootListController.

    See more

    Declaration

    Objective-C

    @interface HBRootListController : HBListController

    Swift

    class HBRootListController : HBListController
  • The PSListController+HBTintAdditions class category in CepheiPrefs provides a property for setting the desired appearance settings of the view controller.

    See more

    Declaration

    Objective-C

    @interface PSListController (HBTintAdditions)