How to access the CGColor property of UIColor in CGContextSetFillColorWithColor?

Posted by Azeworai on Stack Overflow See other posts from Stack Overflow or by Azeworai
Published on 2010-05-02T08:50:53Z Indexed on 2010/05/02 8:57 UTC
Read the original article Hit count: 254

CGContextSetFillColorWithColor(g, [UIColor greyColor].CGColor);

I'm trying to follow O'Reilly's iPhone Game Development book on page 73 Chapter 3 but I'm running into a compile error that states

error: request for member 'CGColor' in something not a structure or union

According to the book's errata page this is an unconfirmed errata in the book. I'm hoping that someone could help me replace that line of code to something that works. The example project can be downloaded from sourceforge at this link.

© Stack Overflow or respective owner

Related posts about oreilly-book

Related posts about uicolor