HBListController Class Reference

Inherits from PSListController
Declared in HBListController.h

Overview

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.

Specifiers

+ hb_specifierPlist

The property list that contains Preference framework specifiers to display as the content of the list controller. Override this method to return the file name of a property list inside your preference bundle, omitting the file extension.

+ (nullable NSString *)hb_specifierPlist

Return Value

By default, nil.

Discussion

If you use this method and override the specifiers method, ensure you call the super method with [super specifiers]; first in your specifiers implementation.

Declared In

HBListController.h

Colors

+ hb_tintColor

The tint color to use for interactable elements within the list controller. Override this method to return a UIColor to use.

+ (nullable UIColor *)hb_tintColor

Return Value

By default, nil.

Discussion

A nil value will cause prior view controllers on the stack to be consulted for a value. If a value is found, that will be used.

Warning: Appearance methods on HBListController are deprecated. Use of these methods will result in a warning being logged. Additionally, if any of these methods return nil, previous view controllers on the stack are consulted. This can cause an undesired mix of color schemes. It is advised to switch to using HBAppearanceSettings.

Declared In

HBListController.h

+ hb_navigationBarTintColor

The tint color to use for the navigation bar buttons, or, if hb_invertedNavigationBar is set, the background of the navigation bar. Override this method to return a UIColor to use, if you don’t want to use the same color as hb_tintColor.

+ (nullable UIColor *)hb_navigationBarTintColor

Return Value

By default, the return value of hb_tintColor.

Discussion

A nil value will cause prior view controllers on the stack to be consulted for a value. If a value is found, that will be used.

Warning: Appearance methods on HBListController are deprecated. Use of these methods will result in a warning being logged. Additionally, if any of these methods return nil, previous view controllers on the stack are consulted. This can cause an undesired mix of color schemes. It is advised to switch to using HBAppearanceSettings.

Declared In

HBListController.h

+ hb_invertedNavigationBar

Whether to use an inverted navigation bar. Override this method if you want this behavior.

+ (BOOL)hb_invertedNavigationBar

Return Value

By default, NO.

Discussion

An inverted navigation bar has a tinted background, rather than the buttons being tinted. All other interface elements will be tinted the same.

A NO value will cause prior view controllers on the stack to be consulted for a value. If a value is found, that will be used.

Warning: Appearance methods on HBListController are deprecated. Use of these methods will result in a warning being logged. Additionally, if any of these methods return nil, previous view controllers on the stack are consulted. This can cause an undesired mix of color schemes. It is advised to switch to using HBAppearanceSettings.

Declared In

HBListController.h

+ hb_translucentNavigationBar

Whether to use a translucent navigation bar. Override this method if you want this behavior.

+ (BOOL)hb_translucentNavigationBar

Return Value

By default, YES.

Discussion

A NO value will cause prior view controllers on the stack to be consulted for a value. If a value is found, that will be used.

Warning: Appearance methods on HBListController are deprecated. Use of these methods will result in a warning being logged. Additionally, if any of these methods return nil, previous view controllers on the stack are consulted. This can cause an undesired mix of color schemes. It is advised to switch to using HBAppearanceSettings.

Declared In

HBListController.h

+ hb_tableViewBackgroundColor

The color to be used for the overall background of the table view. Override this method to return a UIColor to use.

+ (UIColor *)hb_tableViewBackgroundColor

Return Value

By default, nil.

Discussion

A nil value will cause prior view controllers on the stack to be consulted for a value. If a value is found, that will be used.

Warning: Appearance methods on HBListController are deprecated. Use of these methods will result in a warning being logged. Additionally, if any of these methods return nil, previous view controllers on the stack are consulted. This can cause an undesired mix of color schemes. It is advised to switch to using HBAppearanceSettings.

Declared In

HBListController.h

+ hb_tableViewCellTextColor

The color to be used for the text color of table view cells. Override this method to return a UIColor to use.

+ (UIColor *)hb_tableViewCellTextColor

Return Value

By default, nil.

Discussion

A nil value will cause prior view controllers on the stack to be consulted for a value. If a value is found, that will be used.

Warning: Appearance methods on HBListController are deprecated. Use of these methods will result in a warning being logged. Additionally, if any of these methods return nil, previous view controllers on the stack are consulted. This can cause an undesired mix of color schemes. It is advised to switch to using HBAppearanceSettings.

Declared In

HBListController.h

+ hb_tableViewCellBackgroundColor

The color to be used for the background color of table view cells. Override this method to return a UIColor to use.

+ (UIColor *)hb_tableViewCellBackgroundColor

Return Value

By default, nil.

Discussion

A nil value will cause prior view controllers on the stack to be consulted for a value. If a value is found, that will be used.

Warning: Appearance methods on HBListController are deprecated. Use of these methods will result in a warning being logged. Additionally, if any of these methods return nil, previous view controllers on the stack are consulted. This can cause an undesired mix of color schemes. It is advised to switch to using HBAppearanceSettings.

Declared In

HBListController.h

+ hb_tableViewCellSeparatorColor

The color to be used for the separator between table view cells. Override this method to return a UIColor to use.

+ (UIColor *)hb_tableViewCellSeparatorColor

Return Value

By default, nil.

Discussion

A nil value will cause prior view controllers on the stack to be consulted for a value. If a value is found, that will be used.

Warning: Appearance methods on HBListController are deprecated. Use of these methods will result in a warning being logged. Additionally, if any of these methods return nil, previous view controllers on the stack are consulted. This can cause an undesired mix of color schemes. It is advised to switch to using HBAppearanceSettings.

Declared In

HBListController.h

+ hb_tableViewCellSelectionColor

The color to be used when a table view cell is selected. This color will be used when the cell is in the ‘highlighted’ state.

+ (UIColor *)hb_tableViewCellSelectionColor

Return Value

By default, nil.

Discussion

A nil value will cause prior view controllers on the stack to be consulted for a value. If a value is found, that will be used.

Warning: Appearance methods on HBListController are deprecated. Use of these methods will result in a warning being logged. Additionally, if any of these methods return nil, previous view controllers on the stack are consulted. This can cause an undesired mix of color schemes. It is advised to switch to using HBAppearanceSettings.

Declared In

HBListController.h

Related View Controllers

– realNavigationController

Returns the “real” navigation controller for this view controller.

- (UINavigationController *)realNavigationController

Return Value

The real navigation controller.

Discussion

As of iOS 8.0, the navigation controller that owns the navigation bar and other responsibilities is actually a parent of self.navigationController on iPhone, due to the larger Plus models. The realNavigationController method returns the correct navigation controller.

Declared In

HBListController.h