User Tools

Site Tools


Sidebar

Programming Reference/Librarys

Question & Answer

Q&A is closed







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

valueWithCGSize

 
+ (NSValue *)valueWithCGSize:(CGSize)size;
 

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

Return Value - A new NSValue object.

ObjC Sourcecode Example

    // ** Sample datatype **
    CGSize aSize = CGSizeMake(150.0f, 200.0f);
 
    // ** Add the value to nsvalue object **
    NSValue *cgSizeValue = [NSValue valueWithCGSize:aSize];
 
    // ** Output **
    NSLog(@"%@", cgSizeValue);

Output for this example code

2012-12-17 23:25:15.789 NSValueSample[353:11303] NSSize: {150, 200}
advertising
objective-c/foundation.framework/nsvalue.h/valuewithcgsize.txt · Last modified: 2012/12/20 12:24 (external edit)

Impressum Datenschutz