Re: L-shaped custom view in Cocoa?
Re: L-shaped custom view in Cocoa?
- Subject: Re: L-shaped custom view in Cocoa?
- From: Ken Thomases <email@hidden>
- Date: Wed, 04 May 2011 10:38:04 -0500
On May 4, 2011, at 10:21 AM, Vyacheslav Karamov wrote:
> Yes, I understand, I meant want to know how to restrict drawing and responding to events to L-shaped area.
You are responsible for writing the drawing code and the code which responds to events. In your drawing code, just don't draw in the part which isn't in the L shape. If you prefer, you can clip the graphics context to enforce that. See the -[NSBezierPath addClip] method.
For events which have location associated with them, you should check the location and just invoke super for any which fall outside of the L shape.
Regards,
Ken
_______________________________________________
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