Skip to content

Instantly share code, notes, and snippets.

@evadne
Created September 3, 2010 21:29
Show Gist options
  • Save evadne/564602 to your computer and use it in GitHub Desktop.
Save evadne/564602 to your computer and use it in GitHub Desktop.
/* (CGRect) */ function CGRectInsetFromEdges (aRect, offsetTop, offsetRight, offsetBottom, offsetLeft) {
return CGRectMake(
aRect.origin.x - offsetLeft,
aRect.origin.y - offsetBottom,
aRect.size.width + offsetLeft + offsetRight,
aRect.size.height + offsetBotttom + offsetTop,
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment