Programming Reference/Librarys
Question & Answer
Q&A is closed
+ (NSValue *)valueWithCGRect:(CGRect)rect;
Creates and returns an NSValue object that contains the value of a CGRect.
Return Value - A new NSValue object.
//** Sample datatype ** CGRect aRect = CGRectMake(0.0f, 0.0f, 150.0f, 200.0f); // ** Create nsvalue object ** NSValue *cgRectValue = [NSValue valueWithCGRect:aRect]; // ** Output ** NSLog(@"%@", cgRectValue);
2012-12-17 23:18:38.744 NSValueSample[340:11303] NSRect: {{0, 0}, {150, 200}}