Skip to content

Instantly share code, notes, and snippets.

@jakemarsh
Created April 4, 2013 18:57
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jakemarsh/5313130 to your computer and use it in GitHub Desktop.
Save jakemarsh/5313130 to your computer and use it in GitHub Desktop.
Wanna be cooler than all your friends? Create your CGRects like this!
(CGRect){ .size = size, .origin = CGPointMake(31, 257)}
@subdigital
Copy link

Also works:

CGRect foo = { 12, 24, 100, 100 };

As long as they are all constants. Works for CGPoint & CGSize too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment