On Apr 16, 2009, at 2:54 PM, Mohan Parthasarathy wrote:
I have a View whose drawRect method never gets called when I call
[View
setNeedsDisplay]. It looks like the reason is that the View's layer
delegate
is been set and If I remove that drawRect is called. Is this an
expected
behavior or something else is going on ?
Yes, it is expected behavior and documented in the UIView
documentation at <http://developer.apple.com/iphone/library/documentation/UIKit/Reference/UIView_Class/UIView/UIView.html
>.
Specifically under the documentation for the layer property:
"Since the view is the layer’s delegate, you should never set the view
as a delegate of another CALayer object. Additionally, you should
never change the delegate of this layer."
--
David Duncan
Apple DTS Animation and Printing
_______________________________________________
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]