Xcode project & source code related to Add a custom palette to IB that propagates if a color changes iOS answer.
Instructions:
- Open
Main.storyboard
- Navigate to, and select the view named
Color Swatch
- Change the
Tincture Name
or the Color Swatch View in the attribute inspector fromplum
to one ofgoldenrod
,cornsilk
or any other as defined in thenamedColors
array and watch the dynamic preview in Interface Builder.
References:
- Question 31702193 on Stack Overflow
- This and other answers posted on Swift Recipes