CepheiPrefs — General

  • The HBAppearanceSettings class in CepheiPrefs provides a model object read by other components of Cephei to determine colors to use in the user interface.

    Appearance settings are typically set on a view controller, via the -[PSListController(HBTintAdditions) hb_appearanceSettings] property. This is automatically managed by Cephei and provided to view controllers as they are pushed onto the stack.

    This interface replaces the previous method that worked in the opposite way – HBListController would work backwards to find a view controller with appearance settings defined. This was not robust, created messy code within Cephei, and can cause a mix of colors if a view controller with different settings to the prior one is pushed.

    Use of the old properties on HBListController will cause a warning to be logged.

    Most commonly, the API will be used by setting the hb_appearanceSettings property from the init method. The following example sets the tint color, table view background color, and enables an inverted navigation bar:

    - (instancetype)init {
        self = [super init];
    
        if (self) {
            HBAppearanceSettings *appearanceSettings = [[HBAppearanceSettings alloc] init];
            appearanceSettings.tintColor = [UIColor colorWithRed:66.f / 255.f green:105.f / 255.f blue:154.f / 255.f alpha:1];
            appearanceSettings.tableViewBackgroundColor = [UIColor colorWithWhite:242.f / 255.f alpha:1];
            appearanceSettings.invertedNavigationBar = YES;
            self.hb_appearanceSettings = appearanceSettings;
        }
    
        return self;
    }
    
    See more

    Declaration

    Objective-C

    @interface HBAppearanceSettings : NSObject

    Swift

    class HBAppearanceSettings : NSObject
  • The HBSupportController class in CepheiPrefs provides a factory that configures a TSContactViewController for immediate use. The TSContactViewController class, from TechSupport by ashikase, provides a text box for entering a message, as well as the ability to view or remove pre-defined attachments. After tapping the submit button, the information is provided to the next step, which most commonly is an email composer.

    By providing a link instruction, you can have the message sent to a different email address or posted to a website. You can also provide one or more support instructions, which allow more files to be attached. For more information and for examples of TSContactViewController usage, refer to the demos directory in the TechSupport source.

    A TSContactViewController should be pushed on your view controller stack; it should not be presented modally.

    See more

    Declaration

    Objective-C

    @interface HBSupportController : NSObject

    Swift

    class HBSupportController