Nsrange (location length)
"I Love OC"
Nsrange r = Nsmakerange (2,4)
NSString *str = @ "I love You";
Nsrange range = [str rangeofstring:@ "Love"];
NSLog (@ "loc =%ld, length =%ld", range.location, Range.length);
Cannot find length = 0,location = Nsnotfound = =-1 (sign bit involved)
Nspoint\cgpoint Cross-platform
Cgpoint p = nsmakepoint (10, 10);
Nspoint p = cgpointmake (20, 20);
Cgsize s = nsmakesize (20, 20);
Nssize s = cgsizemake (100,100);
Nsrect\cgrect (Cgpoint cgsize)
CGRect r = CGRectMake (0, 0, 2, 3);
Origin.x
Origin.y
Sieze.width
Sieze.height
NSLog ("%@", [Nsstringfromesize (s)]);
Nsstringfromerect (R)
Cgpointzero = = Cgpointmake (0, 0)
CGRect r1 = {Cgpointzero, cgsizemake (100, 100)};
BOOL B = Cgpointequaltopoint (Cgpointmake (Ten), Cgpointmake (10, 20));
Cgrectequaltorect
BOOL B = Cgrectcontainspoint (CGRectMake (80, 80), Cgpointmake (+);
CG = Coregraphics Frame
NS = NextStep's Foundation
OBJECTIVE-C Learning (Foundation framework)--01 structural bodies