• 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: highlight a nsview on click-drag?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: highlight a nsview on click-drag?


  • Subject: Re: highlight a nsview on click-drag?
  • From: Graham Cox <email@hidden>
  • Date: Sun, 15 Mar 2015 14:50:36 +1100

> On 15 Mar 2015, at 3:44 am, Patrick J. Collins <email@hidden> wrote:
>
>  Is there anything built-in that does this for me?


No.

You need to stop thinking this way. Cocoa does a lot, but it doesn't do everything. It goes only as far as very general solutions to very general application needs - a view for example, stops at the point where it gives you a rectangular chunk of screen space to draw into. Beyond that, you are into specifics that pertain to your app only, and as such, you have to code them.

There are many ways to implement a selection rectangle, but the best/right way for you depends on what you intend it to do. Ergo, you have to write that code to suit your own requirements.

A fairly simple way to implement a selection rectangle is to use CALayer, but that only gives you the visual aspect. What does it select? Answer that question first and that will tend to lead you to the appropriate way to implement it.


--Graham
_______________________________________________

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: highlight a nsview on click-drag?
      • From: "Patrick J. Collins" <email@hidden>
References: 
 >highlight a nsview on click-drag? (From: "Patrick J. Collins" <email@hidden>)

  • Prev by Date: Re: Trying to hide a NSProgressIndicator upon finishing of table rendering
  • Next by Date: Re: highlight a nsview on click-drag?
  • Previous by thread: highlight a nsview on click-drag?
  • Next by thread: Re: highlight a nsview on click-drag?
  • Index(es):
    • Date
    • Thread