Using Quartz drawing in iPhone drawRect method

Discussion in 'iOS Programming' started by shawnl, Sep 16, 2008.

  1. shawnl macrumors newbie

    Joined:
    Sep 16, 2008
    #1
    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.
     
  2. CarlosH macrumors member

    Joined:
    Apr 9, 2008
    Location:
    San Francisco, CA
    #2
    Do you have this: #import <QuartzCore/QuartzCore.h>
    Or did you add the QuartzCore.framework.
     

Share This Page