结论
CGPoint cgPoint = CGPointMake(0,0);
//NSLog(@"%@",cgPoint); //错误的输出方法
NSLog(@"%@", NSStringFromCGPoint(cgPoint));
其他可用方法有:
NSStringFromCGPoint
NSStringFromCGSize
NSStringFromCGRect
NSStringFromCGAffineTransform
NSStringFromUIEdgeInsets
示例:
NSLog(@"rect1: %@", NSStringFromCGRect(rect1));
参考资料
Is It Possible to NSLog C Structs (Like CGRect or CGPoint)?