Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What Cocoa/Core Foundation helper functions do you wish you knew about 2 years ago?

I just discovered the NSRect helper functions in NSGeometry.h (i.e. NSMidX, NSMaxX, etc...)

These would have made some repetitive coding much easier. I knew about NSMakeRect, NSMouseInRect, NSOffsetRect and many others but somehow missed the functions that aid in recalculating NSRect geometry.

like image 880
Mark Avatar asked Feb 03 '09 21:02

Mark


1 Answers

I've found NSStringFrom*() helpful when logging structs like CGRect, CGPoint, etc.

You can find a comprehensive overview at Apple's Foundation Functions Reference (Wayback Machine link).

like image 141
Jason Medeiros Avatar answered Nov 03 '22 22:11

Jason Medeiros