krzyzanowskim / Natalie

Natalie - Storyboard Code Generator (for Swift)
http://blog.krzyzanowskim.com/2015/04/15/natalie-storyboard-code-generator/
MIT License
1.17k stars 74 forks source link

Generate a Color class extension with asset colors used in storyboard #109

Closed phimage closed 6 years ago

phimage commented 6 years ago

only for iOS11,tvOS11,macOS10.13 https://littlebitesofcocoa.com/312-asset-catalog-improvements

Add a Color xml class to read color from storyboards

For each OS

For other colors I think about adding it in controller.

See one of the Storyboards.swiftfile

I use the generated constant in demo app in MainViewController.swift


This new functionality of Xcode9/iOS11 seems to have some bugs


An other approach is to generate code from asset. I want to make this generation optional later.

Maybe with a json config file (like #55), now with swift 4 this is easier

krzyzanowskim commented 6 years ago

Nice. How can we workaround the know issues?

krzyzanowskim commented 6 years ago

I'd love to merge it. Can you please add README entry for the feature?

phimage commented 6 years ago

I will And re-test with the latest Xcode