Return to Snippet

Revision: 44249
at April 8, 2011 09:55 by peetj

Initial Code
- (void)drawRect:(CGRect)rect {

        CGContextRef context = UIGraphicsGetCurrentContext();

        CGContextSetLineWidth(context, 2.0);
        CGContextSetStrokeColorWithColor(context, [UIColor blueColor].CGColor);
        CGRect rectangle = CGRectMake(60,170,200,80);
        CGContextAddRect(context, rectangle);
        CGContextSetFillColorWithColor(context, [UIColor redColor].CGColor);
        CGContextFillRect(context, rectangle);

Initial URL

Initial Description

Initial Title
Draw rectangle with blue border and fill the rectangular space with red

Initial Tags

Initial Language
Objective C