#import #import "PSListController+HBTintAdditions.h" NS_ASSUME_NONNULL_BEGIN /// 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 control appearance of the interface. /// /// If you use `HBLinkTableCell` or subclasses such as `HBTwitterCell` and `HBPackageTableCell`, it /// is recommended to subclass from HBListController on the view controller classes containing these /// cells to use CepheiPrefs’s built-in callback actions. If you do not subclass from /// HBListController, you will need to implement action methods yourself. /// /// ### Specifier Parameters /// HBListController extends specifiers with the following parameters: /// /// /// /// /// /// /// /// /// /// /// /// /// /// ///
pl_filter Optional. Supports additional filters that decide whether a specifier /// should be displayed, as specified below.
iconImageSystem Optional. Supports displaying a system image as the cell icon, as /// specified below.
leftImageSystem Optional. Supports displaying a system image as the icon to the /// left of a PSSliderCell’s slider control, as specified below.
rightImageSystem Optional. Supports displaying a system image as the icon to the /// right of a PSSliderCell’s slider control, as specified below.
/// /// #### PreferenceLoader Filter Parameters /// The `pl_filter` key is inherited from PreferenceLoader’s libprefs, and can be used to specify /// [CoreFoundation version](https://iphonedev.wiki/index.php/CoreFoundation.framework) criteria /// for a specifier. Specifiers that do not meet the `pl_filter` criteria will be discarded. /// /// The version number of CoreFoundation is often used as a stable method of checking the operating /// system version in use. It has the benefit of increasing in predictable amounts (to the next /// hundred or more) for each major revision of Apple’s OS platforms, and it is typically roughly /// the same between all Apple OS platforms at any point in time. /// /// /// /// /// ///
CoreFoundationVersion Optional. An array of one or two CoreFoundation version /// numbers in decimal (<real>). If one number is present, this is a minimum bound. The /// current device’s CoreFoundation version must be greater than or equal to this number. If two /// numbers are present, the first number is the lower bound, and the second number is one more than /// the upper bound. The current device’s CoreFoundation version must be greater than or equal to /// the first number, and less than (but not equal to) the second number.
/// /// ##### Example Usage /// ```xml /// /// /// cell /// PSSwitchCell /// label /// My iOS 12+ Only Feature /// pl_filter /// /// CoreFoundationVersion /// /// 1556.00 /// /// /// /// /// /// /// cell /// PSSwitchCell /// label /// My iOS 7-11 Only Feature /// pl_filter /// /// CoreFoundationVersion /// /// 847.20 /// 1556.00 /// /// /// /// /// /// /// cell /// PSSwitchCell /// label /// My iOS <12 Only Feature /// pl_filter /// /// CoreFoundationVersion /// /// 0.0 /// 1556.00 /// /// /// /// ``` /// /// #### System Icon Parameters /// On iOS 13.0 and newer, you can specify a system icon /// ([SF Symbols](https://developer.apple.com/sf-symbols/) glyph) to be displayed in a cell. Use the /// SF Symbols app to find symbol names. /// /// When running on iOS versions earlier than 13.0, icons will not be rendered. This also applies /// when a symbol name is specified that was added in a later iOS version than is currently in use. /// In this case, you can supply a PNG icon through the usual means as a fallback. /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// ///
name Required. The symbol name to use.
weight Optional. The weight to render the symbol at. The supported values are: /// ultraLight, thin, light, regular, medium, semibold, bold, heavy, black. The default is /// regular.
scale Optional. The scale to render the symbol at. The supported values are: small, /// medium, large. The default is medium.
pointSize Optional. The equivalent font size to render the symbol at. The default /// is 20.0.
tintColor Optional. The color to render the icon in. The default is no value, which /// means the tint color will be inherited from the -[HBAppearanceSettings tintColor]; if neither /// value is set, the default iOS blue tint color is used. When backgroundColor is set, no value /// means white (#ffffff) will be used.
backgroundColor Optional. The background color to use for the symbol. When /// specified, the symbol will be rendered inside an icon shape of the specified background color. /// The symbol will be scaled down by 20% to appropriately fit the icon shape. The default is no /// value, which means no icon shape will be rendered.
/// /// ##### Example Usage /// /// ```xml /// /// /// cell /// PSSwitchCell /// label /// Awesome /// iconImageSystem /// /// name /// switch.2 /// /// /// /// /// /// cell /// PSLinkCell /// detail /// HBDemoAboutListController /// isController /// /// label /// ABOUT /// iconImageSystem /// /// name /// info.circle /// /// /// /// /// /// cell /// PSSliderCell /// min /// 1 /// max /// 15 /// leftImageSystem /// /// name /// sun.min /// /// rightImageSystem /// /// name /// sun.max /// /// /// /// /// /// cell /// PSButtonCell /// cellClass /// HBLinkTableCell /// label /// DONATE /// url /// https://hashbang.productions/ /// iconImageSystem /// /// name /// heart /// backgroundColor /// #ff3b30 /// /// /// ``` @interface HBListController : PSListController /// @name Specifiers /// 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. /// /// Example: /// ```objc /// + (NSString *)hb_specifierPlist { /// return @"Root"; /// } /// ``` /// /// If you use this method and override the `specifiers` method, ensure you call the super method /// with `[super specifiers];` first in your `specifiers` implementation. /// /// @return By default, nil. @property (nonatomic, strong, readonly, class, nullable) NSString *hb_specifierPlist NS_SWIFT_NAME(specifierPlist); /// @name Related View Controllers /// Returns the “real” navigation controller for this view controller. /// /// 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. /// /// @return The real navigation controller. - (UINavigationController *)realNavigationController; @end NS_ASSUME_NONNULL_END