HBAboutListController Class Reference

Inherits from HBListController : PSListController
Declared in HBAboutListController.h

Overview

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>

Constants

+ hb_websiteURL

The website URL to open when tapping the “visit website” cell. Override this method to return your own URL.

+ (NSURL *)hb_websiteURL

Return Value

By default, https://www.hbang.ws/.

Discussion

Deprecated. It is encouraged to use an HBLinkTableCell instead.

Declared In

HBAboutListController.h

+ hb_donateURL

The website URL to open when tapping the “donate” cell. Override this method to return your own URL.

+ (NSURL *)hb_donateURL

Return Value

By default, https://www.hbang.ws/donate/.

Discussion

Deprecated. It is encouraged to use an HBLinkTableCell instead.

Declared In

HBAboutListController.h

+ hb_supportEmailAddress

The email address to use in the support email composer form. Override this method to return an email address.

+ (nullable NSString *)hb_supportEmailAddress

Return Value

By default, nil.

Discussion

If this method returns nil, the package’s author email address is used.

Declared In

HBAboutListController.h

+ hb_supportInstructions

The instructions to provide to the TechSupport framework, in addition to the default ones provided by Cephei. For details and examples of support instructions, refer to the TechSupport project’s GitHub repo: https://github.com/ashikase/TechSupport/tree/master/Demo

+ (nullable NSArray<TSIncludeInstruction*> *)hb_supportInstructions

Return Value

By default, nil.

Declared In

HBAboutListController.h

Preference Specifier Actions

– hb_openWebsite

Opens the user’s browser to the URL specified by hb_websiteURL.

- (void)hb_openWebsite

Discussion

Deprecated. It is encouraged to use an HBLinkTableCell instead.

Declared In

HBAboutListController.h

– hb_openDonate

Opens the user’s browser to the URL specified by hb_donateURL.

- (void)hb_openDonate

Discussion

Deprecated. It is encouraged to use an HBLinkTableCell instead.

Declared In

HBAboutListController.h

– hb_sendSupportEmail

Displays a support composer form.

- (void)hb_sendSupportEmail

Discussion

The hb_supportEmailAddress and hb_supportInstructions methods are used to provide the appropriate parameters to HBSupportController.

Declared In

HBAboutListController.h