Skip to content

Instantly share code, notes, and snippets.

@cbess
Created September 13, 2011 18:48
Show Gist options
  • Save cbess/1214667 to your computer and use it in GitHub Desktop.
Save cbess/1214667 to your computer and use it in GitHub Desktop.
iOS UIView.frame.origin = rect macro
// Expands to set self.frame.origin
#define UIViewOrigin(X, Y) ({ \
CGRect frame = self.frame; \
frame.origin = CGPointMake(X, Y); \
self.frame = frame; })
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment