摘要:
NSLog(@“Scheme: %@”, [url scheme]);NSLog(@“Host: %@”, [url host]);NSLog(@“Port: %@”, [url port]);NSLog(@“Path: %@”, [url path]);NSLog(@“Relative path: %@”, [url relativePath]);NSLog(@“Path components as array: %@”, [url pathComponents]);NSLog(@“Parameter string: %@”, [url parameterString]);NSLog(@“Q 阅读全文
摘要:
判断给定的点是否被一个CGRect包含,可以用CGRectContainsPoint函数BOOLcontains= CGRectContainsPoint(CGRect rect, CGPoint point);判断一个CGRect是否包含再另一个CGRect里面,常用与测试给定的对象之间是否又重叠BOOLcontains= CGRectContainsRect(CGRect rect1, CGRect rect2);判断两个结构体是否有交错.可以用CGRectIntersectsRectBOOL contains = CGRectIntersectsRect(CGRect rect1, CG 阅读全文