Skip to content

An XCode 6+ Plugin to pass named UIColors from categories into Interface Builder

License

Notifications You must be signed in to change notification settings

timothyrobb/TRColorPalette

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TRColorPallette

This XCode 6+ plugin was built out of the need to make a named palette of colours, perhaps from a design, to use inside IB without having to constantly share hexcodes around. It essentially read the named static methods you provide in your UIColor category, and makes those colours available in IB's colour dropdowns.

Installation

Usage

  1. Add a UIColor category if you haven't already. (e.g. this article )
  2. Add IB_DESIGNABLE to before the @interface in your UIColor category's header file.
  3. Open IB (either your .xib or your .storyboard)
  4. Select a colour picker, and viola, your colour is available.

Notes

  • This will only detect categories that have the IB_DESIGNABLE flagged in the class. This is by design, so you don't fill your palette up too much
  • This will only work for any static methods that don't take any parameters and return a UIColor object (i.e. +(instancetype)magentaColor; or + (UIColor) lightBeigeColor;
  • This will strip off the word color or colour from the end of the colour's name.

About

An XCode 6+ Plugin to pass named UIColors from categories into Interface Builder

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published