I have a really simple UIView subclass, all it contains is this:

- (void)drawRect:(CGRect)rect
{
        CGContextRef ctx = UIGraphicsGetCurrentContext();
        CGContextSetRGBFillColor(ctx, 1.0f, 1.0f, 1.0f, 1.0f);
        CGContextFillEllipseInRect(ctx, CGRectMake(10.0f, 10.0f, 100.0f, 
100.0f));
}

It should draw a white circle. To use it, I'm programatically creating the view 
using UIView initWithFrame: then adding it as a subview in my 
UIViewController's viewDidLoad method. The problem is that a black square 
appears behind the circle. I don't know if this is due to the fact that there 
are several CALayers under the view. Any suggestions?


Independent Cocoa Developer, Macatomy Software
http://macatomy.com


_______________________________________________

Cocoa-dev mailing list ([email protected])

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to