setStroke method has no effect?


This is getting annoying…

First the ‘lineWidth’ method doesnt do anything and now the setStroke method has no affect either?? Im following the code in the book as it is.

[code]- (void)drawRect:(CGRect)rect
CGRect bounds = self.bounds;

// Figure out the center of the bounds rectangle
CGPoint centre;
centre.x = bounds.origin.x + bounds.size.width / 2.0;
centre.y = bounds.origin.y + bounds.size.height / 2.0;

// The circle will be the largest that will fit in the view

float radius = (MIN(bounds.size.width, bounds.size.height)/2.0);

UIBezierPath *path = [[UIBezierPath alloc]init];

// Add an arc to the path at centre, with radius of radius, from 0 to 2*PI(a circle).
[path addArcWithCenter:centre radius:radius startAngle:0.0 endAngle:M_PI * 2 clockwise:YES];

// Draw the line!
[path stroke];

// Configure line width to 10 points
path.lineWidth = 10;

// Configure the drawing colour to light gray
[[UIColor lightGrayColor]setStroke];  <<<<<<<HAS NO EFFECT????



I just answered this but it’s been answered here:


Yea just figured it out with help from another member!

I need a break I think!
Thanks alot