Post

Replies

Boosts

Views

Activity

Reply to How to access color from an asset catalog in a shared framework in a watchOS app?
This is a hack, but I created an objc header to make the UITraitCollection definition available to watchOS. This allowed for the UIColor(named name: String, in bundle: Bundle?, compatibleWith traitCollection: UITraitCollection?) method to be accessed. Objc header file added to the framework: #if TARGET_OS_WATCH @import UIKit; @interface UITraitCollection : NSObject @end #endif
Topic: UI Frameworks SubTopic: UIKit Tags:
Mar ’21