FUITintableDrawingView
open class FUITintableDrawingView<T> : FUIBaseDrawingView, FUITintAttributesProvider, FUIAttributesProvider, FUIEnabledComponent, FUIStyleTintByStringAttributes, TintStyleGrabbing where T : Defaultable, T : Enableable, T : Hashable
Undocumented
-
Declaration
Swift
open func tintAttributes(for property: FUIPropertyRef, state: TintState) -> [NSAttributedStringKey : Any]
-
Declaration
Swift
open func tintAttributes(for property: FUIPropertyRef) -> [NSAttributedStringKey : Any]
-
Declaration
Swift
public func styleSheetTintAttributes(for property: FUIPropertyRef, state: TintState) -> [NSAttributedStringKey : Any]
-
Declaration
Swift
public func styleSheetTintAttributes(for property: FUIPropertyRef) -> [NSAttributedStringKey : Any]
-
Declaration
Swift
public typealias TintState = T
-
Declaration
Swift
open var tintAttributes: [FUIPropertyRef : [T : [NSAttributedStringKey : Any]]] { get set }
-
Declaration
Swift
open var tintState: T { get set }
-
Aggregate state property, which combines the developer-set value with the current state of the relevant containing views. This accounts for cases where the view should be disabled as a result of a property on a parent view. For example, the
FUITintableDrawingView
may be a subview of aUICollectionViewCell
; collection view cell selection is managed by theallowsSelection
andallowsMultipleSelection
properties in theUICollectionView
. The result of this property is: if the containing view is enabled, or there is no container, return: this view’sisEnabled' value. If the containing view is not enabled, return
false`.Declaration
Swift
open var isEnabled: Bool { get set }
-
Declaration
Swift
open override func prepareForReuse()
-
Utility function to store the control’s current state, while a temporary transition to another state occurs. Should be paired with with
restoreTintStateFromCache()
. Useful for press gestures, where the control transitions tohighlighted
.Declaration
Swift
open func cacheTintState()
-
Utility function to restore the control’s original state, before a temporary transition to another state. Should follow a call to
cacheTintState()
. If no state has been previously cached, the call will return.Declaration
Swift
open func restoreTintStateFromCache()