how to find a object in rect or at point

On a NSView there are many other NSViews and some of them are moving with keyboard scroll keys. when moving object come on top of any static one i want to get which object sits under moving one. with mouse this is easy however without mouse i couldn't find a way to achieve this.

Answers


You'll need to loop through all of the views you want to test, get each view's frame, convert that rectangle to the relevant view's coordinate system (search for “convertRect:” in the NSView docs), and then use the geometry functions to test whether the moving view's converted frame intersects the static view's frame.


Need Your Help

Creating .net application that will run without user having to install dependencies

.net deployment .net-framework-version

I want to develop a wpf application that runs on windows 8 without having the user install any dependencies. From doing research I found:

Differentiate between TcpClient and WebSocket?

sockets c#-4.0 websocket client-server

I am developing an application in which i am using socket for the communication between server application and client application(web and desktop both). My server application continuously listening...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.