• 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
Re: L-shaped custom view in Cocoa?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: L-shaped custom view in Cocoa?
      • From: Quincey Morris <email@hidden>
References: 
 >L-shaped custom view in Cocoa? (From: Vyacheslav Karamov <email@hidden>)
 >Re: L-shaped custom view in Cocoa? (From: Steve Christensen <email@hidden>)
 >Re: L-shaped custom view in Cocoa? (From: Vyacheslav Karamov <email@hidden>)

  • Prev by Date: Re: iOS nib weirdness...
  • Next by Date: Nested NSCollectionView scroll weirdness
  • Previous by thread: Re: L-shaped custom view in Cocoa?
  • Next by thread: Re: L-shaped custom view in Cocoa?
  • Index(es):
    • Date
    • Thread