Skip to content

Instantly share code, notes, and snippets.

@sendoa
Created November 23, 2012 12:29
Show Gist options
  • Save sendoa/4135421 to your computer and use it in GitHub Desktop.
Save sendoa/4135421 to your computer and use it in GitHub Desktop.
NSLog rápidos de CGRect o CGPoint
// http://mobiledevelopertips.com/debugging/print-cgrect-and-cgpoint-using-nslog.html
struct CGPoint {
CGFloat x;
CGFloat y;
};
typedef struct CGPoint CGPoint;
struct CGRect {
CGPoint origin;
CGSize size;
};
typedef struct CGRect CGRect;
CGRect rect = [[UIScreen mainScreen] applicationFrame];
NSLog(@"rect: %@", NSStringFromCGRect(rect));
CGPoint point = CGPointMake(100.00, 200.0);
NSLog(@"point: %@", NSStringFromCGPoint(point));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment