Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

shawnl

macrumors newbie
Original poster
Sep 16, 2008
4
0
All I want to do is use some basic Quartz drawing in the drawRect method of my UIView subclass but I am having problems; which I think stem from not configuring my View subclass for Quartz before attemping.

The only code I have added to the View subclass is in the drawRect method and is as follows (This is transcribed from the MAC so forgive typing errors):

CGContextRef context = UIGraphicsGetCurrentContext();
CGContextSetRGBStrokeColoe(context, 1.0, 1.0, 1.0, 1.0);

The above lines are the only bits of code in that method; yet when I build I get the following error

collect2: Id returned 1 exit statu
symbol(s) not found
-[TestView drawRect] in TestView.o
"_CGContextSetRGBStrokeColor", referenced from

I have already looked over the QuartzDemo sample project which handles drawing a slightly different way and I felt was a little hard to follow.
 
All I want to do is use some basic Quartz drawing in the drawRect method of my UIView subclass but I am having problems; which I think stem from not configuring my View subclass for Quartz before attemping.

The only code I have added to the View subclass is in the drawRect method and is as follows (This is transcribed from the MAC so forgive typing errors):

CGContextRef context = UIGraphicsGetCurrentContext();
CGContextSetRGBStrokeColoe(context, 1.0, 1.0, 1.0, 1.0);

The above lines are the only bits of code in that method; yet when I build I get the following error

collect2: Id returned 1 exit statu
symbol(s) not found
-[TestView drawRect] in TestView.o
"_CGContextSetRGBStrokeColor", referenced from

I have already looked over the QuartzDemo sample project which handles drawing a slightly different way and I felt was a little hard to follow.

Do you have this: #import <QuartzCore/QuartzCore.h>
Or did you add the QuartzCore.framework.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.