• 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] custom CALayer drawing
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[iPhone] custom CALayer drawing


  • Subject: [iPhone] custom CALayer drawing
  • From: PCWiz <email@hidden>
  • Date: Thu, 11 Feb 2010 16:44:26 -0700

I'm trying to do some custom drawing in a CALayer subclass by overriding the drawInContext: method, but it appears that its not being called. In my subclass I just have this:

- (void)drawInContext:(CGContextRef)theContext
{
    NSLog(@"drawInContext called");
}

Then in the viewDidLoad method of my view controller I have this:

CustomLayer *lines = [CustomLayer layer];
[self.view.layer addSublayer:lines];

However, the drawInContext method is never called. What am I doing wrong here?_______________________________________________

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] custom CALayer drawing
      • From: David Duncan <email@hidden>
    • Re: [iPhone] custom CALayer drawing
      • From: Bob Barnes <email@hidden>
  • Prev by Date: Re: Core Data: Insert, Fetch, Re-Fetch. Same Object?
  • Next by Date: Re: Core Data Issue with Binding
  • Previous by thread: Re: iPhone: UIWebView not displaying until scrolled?
  • Next by thread: Re: [iPhone] custom CALayer drawing
  • Index(es):
    • Date
    • Thread