David Beck's Blog

CGInsetRect

Wednesday, September 9th, 2009

I titled this post as such because I am hoping to help others that are in the situation I was in. Go ahead and Google “CGInsetRect”. When I did, I got 0 results. Not a single page has anything on it. The reason? While on Mac OS X you would call NSInsetRect, on iPhone you use CGRects. They are almost identical including having the same function set. The catch? NSRects functions all use the naming convention NSFunctionRect. CGRects on the other hand, as I forgot, use CGRectFunction.
For everyone looking for the function above, use CGRectInset.

Filed under: Programming Tags: ,

Leave a Reply