Re: drawRect not called when hosting Layers
Re: drawRect not called when hosting Layers
- Subject: Re: drawRect not called when hosting Layers
- From: David Duncan <email@hidden>
- Date: Thu, 6 May 2010 09:39:30 -0700
On May 6, 2010, at 8:09 AM, Gustavo Pizano wrote:
> BUT the view controller of the super view that holds that particular view in fact its controls 2 view controllers witch their respective views, the one mentioned above and another one.
> So when I swap the view controllers and change the view, and I try to go back I get an “EXC_BAD_ACCESS , because the layer that will perform the animation couldn't get again its frame, I tought it was becuase I wasn't retaining the view before swapping for the other one, but no, I was retaining, removing from superview adding the other view controller as the current controller and adding its view to the main controller's view.
Not sure why this would be exactly, but I would recommend debugging this route a bit more...
> notices the comment on line 3, If I comment line, the drawRect of the view its called, but I don't see any animation when the mouse enter the specific tracking area, but if I don't comment it, the drawRect its never called, but I see the animation being displayed when mouseEnter .
When you create a layer hosting view (that is, assign a layer directly to the view) then -drawRect: will not be called. This is to prevent AppKit from overwriting the content you may have assigned to the layer. And if you don't enabling layer backing, then AppKit won't display the layer and thus won't display your animation.
--
David Duncan
Apple DTS Animation and Printing
_______________________________________________
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