Re: Converting to Window Coordinates
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