Adrian Sluijters

CocoaPods trunk is moving to be read-only. Read more on the blog, there are 18 months to go.
2pods
# EMIHexiColor (NSColor+EMIHexiColor)
NSColor+EMIHexiColor is a compiler-aware category for both iOS and OS X to extend UIColor or NSColor with the capability to parse hex strings (6 characters long) i.e. AABBCC. It'll work well on shared code between iOS and Mac projects without you needing to alter code to accomodate either individually.'
Get the colors from a UIColor
or NSColor
from any of your favourite color pickers. And from there you:
```objc // iOS
someViewYouWantToColor.backgroundColor = [AnyOSColor colorWithHexRGB:@"FF9500"];
objc
// OS X
someViewYouWantToColor.backgroundColor = [AnyOSColor colorWithHexRGB:@"FF0000"];
AnyOSColor
is actually a macro that is handled at compile time. depending on what you're compiling for i.e. iOS or OSX, AnyOSColor ultimately renders to UIColor ot NSColor.
Because this category was needed in a hurry, alot of the input string checking was skipped (i.e. the hex string checking). Feel free to update it and let me know so i can add it to the repo for others to enjoy too.
There are two demo's apps with the code, both for OS X and iOS.
1.0.5
This grand bottle of wine that kept me sane this evening!
License: MIT
A compiler-aware category for iOS and OS X to extend UIColor and NSColor with the flat colors from the Flat UI framework. http://designmodo.github.io/Flat-UI/
#import "NSUIColor+FlatColors.h"
#import "UIColor+FlatColors.h"
#import "NSColor+FlatColors.h"
someViewYouWantToColor.backgroundColor = [UIColor flatEmeraldColor];
someViewYouWantToColor.backgroundColor = [NSColor flatEmeraldColor];
License: MIT