RBThemeTrackerDelegate Protocol Reference

Conforms to NSObject
Declared in RBThemeTracker.h

Overview

A delegate to provide theming integration to a view or object.

– applyTheme: required method

Called when a new theme should be applied to the receiver. Only called if the theme is not nil.

- (void)applyTheme:(nonnull NSDictionary<NSString*,id> *)theme

Parameters

theme

The theme dictionary that is being applied.

Declared In

RBThemeTracker.h

+ generateThemeSchemaWithParent: required method

Generates a theme schema that describes the theming options available on the receiver.

+ (nonnull RBThemeSchema *)generateThemeSchemaWithParent:(nullable RBThemeSchema *)parent

Parameters

parent

The optional parent schema for recursion protection.

Return Value

The generated RBThemeSchema object.

Declared In

RBThemeTracker.h

– canApplyThemeUpdates

Determines whether or not theme updates can currently be applied. If not, changes will continue to mount until the next time changes are processed and this method returns true.

- (BOOL)canApplyThemeUpdates

Return Value

Determines whether or not theme updates can currently be applied.

Declared In

RBThemeTracker.h

– willApplyTheme:

Called when applyTheme: will be called and before the theme changes have been applied. Only called if the theme is not nil.

- (void)willApplyTheme:(nonnull NSDictionary<NSString*,id> *)theme

Parameters

theme

The theme dictionary that is being applied.

Declared In

RBThemeTracker.h

– didApplyTheme:

Called when applyTheme: has been called and the theme changes have been committed. Only called if the theme is not nil.

- (void)didApplyTheme:(nonnull NSDictionary<NSString*,id> *)theme

Parameters

theme

The theme dictionary that is being applied.

Declared In

RBThemeTracker.h

– processThemeEvent:

Called when if one of the RBThemeTrackerEvent events are raised. Provides UIView’s or UIViewController’s to take action action on internally held UIView’s that may not be exposed. For example RBButton (which is a subclass of UIButton) has the inherited internal UILabel ‘titleLabel’ and UIImageView ‘imageView’ views. On receiving this method call RBButton calls theme.clear on the titleLabel and imageView respectively. Additionally the disableTheming, and shouldApplyThemingOnMaterialization values are set accordingly on the internal imageView and titleLabel.

- (void)processThemeEvent:(RBThemeTrackerEvent)event

Parameters

event

The event that needs to be processed.

Declared In

RBThemeTracker.h