Skip to content

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

Description

@flemingm

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;
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions