[swift-evolution] VisualFoundation Framework
alblue at apple.com
Thu Jun 1 03:37:46 CDT 2017
> On 1 Jun 2017, at 03:48, Jonathan Hull via swift-evolution <swift-evolution at swift.org> wrote:
> Hi Everyone,
> I am not sure whether Swift Evolution’s charter extends to the common foundation framework which will be distributed with Swift (If not, then I hope this request reaches the right people).
> I would like to see another open framework distributed with Foundation that holds common base UI related objects. Mainly Color, AttributedString, and Image. I have a lot of code that needs to include UIKit or Cocoa only because of these 3 classes (NS/UIColor, etc…). It would be extremely helpful to be able to use the same code for these across platforms, but they are all visual ideas, and thus are not included in Foundation.
These are Apple frameworks, rather than Swift, and so discussion should probably be on the Apple mailing lists instead. In the interim there isn't anything preventing you from having a library that does the appropriate platform-specific #if test, and then uses typealias to associate an identifier such as GenericColor with your NSColor or UIColor as appropriate.
More information about the swift-evolution