You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Change tint color after a view-backed node loaded: tintColorDidChange will be called immediately.
Change tint color before a view-backed node loads: tintColorDidChange will be called when the node loads. This is because when we load the node's view and apply pending state to it, the view will call tintColorDidChange on itself which will call the node's counterpart (see -[_ASDisplayView tintColorDidChange]).
Change tint color after a layer-backed node loaded: tintColorDidChange will be called immediately.
Change tint color before a layer-backed node loads: tintColorDidChange will not be called, even when the node loads.
A more developer-friendly API should make sure the same behavior applies regardless of whether the node is view-backed or layer-backed.
We should also see if we can support the same behaviors for wrapper nodes (nodes that wrap around normal UIView objects via -initWithViewBlock:). Our -[_ASDisplayView tintColorDidChange] hook doesn't work in this case, so we may have to swizzle.
The text was updated successfully, but these errors were encountered:
nguyenhuy
changed the title
tintColorDidChange is not called if the color is changed before a layer-backed node is loaded
tintColorDidChange will not be called if the color is changed before a layer-backed node is loaded
Aug 15, 2019
nguyenhuy
changed the title
tintColorDidChange will not be called if the color is changed before a layer-backed node is loaded
-tintColorDidChange will not be called if the color is changed before a layer-backed node is loaded
Aug 15, 2019
nguyenhuy
changed the title
-tintColorDidChange will not be called if the color is changed before a layer-backed node is loaded
-tintColorDidChange will not be called if the color is changed before a layer-backed node loads
Aug 15, 2019
After #1620, developers can expect that:
tintColorDidChange
will be called immediately.tintColorDidChange
will be called when the node loads. This is because when we load the node's view and apply pending state to it, the view will calltintColorDidChange
on itself which will call the node's counterpart (see-[_ASDisplayView tintColorDidChange]
).tintColorDidChange
will be called immediately.tintColorDidChange
will not be called, even when the node loads.A more developer-friendly API should make sure the same behavior applies regardless of whether the node is view-backed or layer-backed.
We should also see if we can support the same behaviors for wrapper nodes (nodes that wrap around normal UIView objects via
-initWithViewBlock:
). Our-[_ASDisplayView tintColorDidChange]
hook doesn't work in this case, so we may have to swizzle.The text was updated successfully, but these errors were encountered: