From the Foundation Functions Reference:
BOOL NSPointInRect (
NSPoint aPoint,
NSRect aRect
);
"Returns a Boolean value that indicates whether a given point is in a given rectangle."
A valid question because not everyone realises that there are a great many helper functions provided in the Foundation NSRect Extensions Reference file which save you having to re-invent the wheel all over the place.
Have a quick read through the reference to see all the different places it can help. I found it very useful when starting out.
NSPointInRect?
I started this thread What Cocoa/Core Foundation helper functions do you wish you knew about 2 years ago? You may find something else you didn't know about.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With