CGFloat: indicates a floating point.
CGPoint: indicates a vertex.
CGsize: indicates a rectangle with only the height and width.
CGRect: indicates the position of a rectangle with the origin.
CGRectZero: This constant is used when the height is zero, the width is zero, and the origin position is zero. You need to create a border but you are not sure about the border size and position.
CGPointMake, CGRectMake, and CGSizeMake are used for initialization.
NSStringFromPoint, NSStringFromRect, and NSStringFromSize are used to convert Poing, rect, and size into strings.
Code:
CGFloat f = 1.2f;
CGPoint point = CGPointMake (1.2F, 2.3F );
CGRect cgrect = CGRectMake (1.2f, 2.3, 4.5, 5.6 );
CGSize size = CGSizeMake (2.3, 3.2 );
NSLog (@ "float is % f", f );
NSLog (@ "point is % @", NSStringFromPoint (point ));
NSLog (@ "cgrect is % @", NSStringFromRect (cgrect ));
NSLog (@ "size is % @", NSStringFromSize (size ));
Result
15:29:25. 522 test [1734: 303] float is 1.200000
15:29:25. 523 test [1734: 303] point is {1.2000000476837158, 2.2999999523162842}
15:29:25. 523 test [1734: 303] cgrect is {1.2000000476837158, 2.2999999999999998}, {4.5, 5.5999999999999996 }}
15:29:25. 523 test [1734: 303] size is {2.2999999999999998, 3.2000000000000002}