• 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: Converting to Window Coordinates
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Converting to Window Coordinates


  • Subject: Re: Converting to Window Coordinates
  • From: Dave <email@hidden>
  • Date: Wed, 22 Apr 2015 21:56:31 +0100

> On 22 Apr 2015, at 20:52, Lee Ann Rucker <email@hidden> wrote:
>
>> Is hit testing the content view the only way to tell which window a point falls within? At the moment I loop though all windows until I find one which works, but is a bit inefficient.
>
> Since everything's in the same coordinate space now, use NSPointInRect on the window frame.

Ok, but I still have to loop through my windows, there is no method I can call that will return the window for the point directly? e.g.

myWindow = [<something> getWindowForScreenPoint:thePoint);

it’s no big deal and I have it working already, it’s just if there is a system method then I may as well use it.

All the Best
Dave




_______________________________________________

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: Converting to Window Coordinates
      • From: Lee Ann Rucker <email@hidden>
References: 
 >Converting to Window Coordinates (From: Dave <email@hidden>)
 >RE: Converting to Window Coordinates (From: Lee Ann Rucker <email@hidden>)
 >Re: Converting to Window Coordinates (From: Dave <email@hidden>)
 >RE: Converting to Window Coordinates (From: Lee Ann Rucker <email@hidden>)
 >Re: Converting to Window Coordinates (From: Dave <email@hidden>)
 >RE: Converting to Window Coordinates (From: Lee Ann Rucker <email@hidden>)
 >Re: Converting to Window Coordinates (From: Dave <email@hidden>)
 >RE: Converting to Window Coordinates (From: Lee Ann Rucker <email@hidden>)
 >Re: Converting to Window Coordinates (From: Dave <email@hidden>)
 >RE: Converting to Window Coordinates (From: Lee Ann Rucker <email@hidden>)

  • Prev by Date: Re: Converting to Window Coordinates
  • Next by Date: RE: Converting to Window Coordinates
  • Previous by thread: Re: Converting to Window Coordinates
  • Next by thread: RE: Converting to Window Coordinates
  • Index(es):
    • Date
    • Thread