User Tools

Site Tools


Sidebar

Programming Reference/Librarys

Question & Answer

Q&A is closed







objective-c:foundation.framework:nsvalue.h:valuewithcgrect

valueWithCGRect

 
+ (NSValue *)valueWithCGRect:(CGRect)rect;
 

Creates and returns an NSValue object that contains the value of a CGRect.

Return Value - A new NSValue object.

ObjC Sourcecode Example

    //** Sample datatype **
    CGRect aRect = CGRectMake(0.0f, 0.0f, 150.0f, 200.0f);
 
    // ** Create nsvalue object **
    NSValue *cgRectValue = [NSValue valueWithCGRect:aRect];
 
    // ** Output **
    NSLog(@"%@", cgRectValue);

Output for this example code

2012-12-17 23:18:38.744 NSValueSample[340:11303] NSRect: {{0, 0}, {150, 200}}

on the occasion of the current invasion of Russia in Ukraine

Russian Stop this War
objective-c/foundation.framework/nsvalue.h/valuewithcgrect.txt · Last modified: 2024/02/16 01:12 (external edit)

Impressum Datenschutz