StyleManagerDelegate
public protocol StyleManagerDelegate : AnyObject, UnimplementedLogging
The StyleManagerDelegate
protocol defines a set of methods used for controlling the style.
-
location(for:)
Default implementationAsks the delegate for a location to use when calculating sunset and sunrise
Default Implementation
UnimplementedLogging
prints a warning to standard output the first time this method is called.Declaration
Swift
func location(for styleManager: StyleManager) -> CLLocation?
-
styleManager(_:viewForApplying:)
Default implementationAsks the delegate for the view to be used when refreshing appearance.
The default implementation of this method will attempt to cast the delegate to type
UIViewController
and use itsview
property.Default Implementation
Declaration
Swift
func styleManager(_ styleManager: StyleManager, viewForApplying currentStyle: Style?) -> UIView?
-
styleManager(_:didApply:)
Default implementationInforms the delegate that a style was applied.
This delegate method is the equivalent of
Notification.Name.styleManagerDidApplyStyle
.Default Implementation
UnimplementedLogging
prints a warning to standard output the first time this method is called.Declaration
Swift
func styleManager(_ styleManager: StyleManager, didApply style: Style)
-
styleManagerDidRefreshAppearance(_:)
Default implementationInforms the delegate that the manager forcefully refreshed UIAppearance.
Default Implementation
UnimplementedLogging
prints a warning to standard output the first time this method is called.Declaration
Swift
func styleManagerDidRefreshAppearance(_ styleManager: StyleManager)