echoz / MNcoder

NSKeyedArchiver/Unarchiver composition that outputs portable serialized plists. Specifically written for Mindnode. To as losslessly as possible bring NSAttributedStrings from iOS to the Mac and vice versa.
23 stars 6 forks source link

NNCColor.m on IOS V5.1 does not handle Grey scale #3

Open flemingm opened 11 years ago

flemingm commented 11 years ago

Fixed by change to the following:

-(id)initWithColor:(UIColor *)color { if ((self = [super init])) { // Need to deal with CTForegroundColor = "<CGColor 0x6d9de00> [<CGColorSpace 0x6d81eb0> (kCGColorSpaceDeviceGray)](0 1)"; if ([color getRed:&_red green:&_green blue:&_blue alpha:&_alpha] == NO) { CGFloat white; if ([color getWhite:&white alpha:&_alpha]) { _blue = _green = _red = white;
// NSLog(@"Grayscale converted to Color"); } }; } return self; }

echoz commented 11 years ago

Could you make this a pull request so I can properly attribute the fix? :)

flemingm commented 11 years ago

when I have time... yes -- will be most lilkey sat or sun