• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
[iPhone] Black background behind UIView??
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[iPhone] Black background behind UIView??


  • Subject: [iPhone] Black background behind UIView??
  • From: PCWiz <email@hidden>
  • Date: Sat, 13 Feb 2010 22:45:39 -0700

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@hidden)

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:

This email sent to email@hidden

  • Follow-Ups:
    • Re: [iPhone] Black background behind UIView??
      • From: David Duncan <email@hidden>
  • Prev by Date: Re: Crash while drawing cell in NSOutlineView
  • Next by Date: Executing shell script with root privilege
  • Previous by thread: Re: executeFetchRequest with BETWEEN
  • Next by thread: Re: [iPhone] Black background behind UIView??
  • Index(es):
    • Date
    • Thread