R.swift
R.swift copied to clipboard
R.color compatible with trait collection not working
My assumption for the API might be wrong, but I kinda assumed that R.color.white(compatibleWith: UIKit.UITraitCollection?)
can be used to force returning color for specific interface mode, however this doesn't seem to work.
This doesn't work - always returns color based on currently active color scheme:
R.color.white(compatibleWith: UITraitCollection(userInterfaceStyle: .light))
This however works as expected and returns color set for light mode:
R.color.white()?.resolvedColor(with: UITraitCollection(userInterfaceStyle: .light))
Podfile.lock:
- R.swift (6.1.0):
- R.swift.Library (~> 5.3.0)
- R.swift.Library (5.3.0)