On Jun 19, 2009, at 9:26 AM, Chunk 1978 wrote:
i don't understand the difference between the 2. i think i'm suppose to simply set the frame size in initWithFrame method, and set attributes (like background color, and clipping masks, etc.) in the drawRect method.
-initWithFrame: is one of the designated initailizers for a UIView (the other is -initWithCoder: for loading from a NIB). When - initWithFrame: completes, the view needs to be initialized to the point that it can do something useful.
-drawRect: is just for drawing. You should be doing as little as possible inside of -drawRect: and it should all be 100% related to drawing the content of your view. You may read from various properties, but you almost never set them.
-- David Duncan Apple DTS Animation and Printing _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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 arch...@mail-archive.com