CGRectContainsPoint 用法
2016-04-15 12:21
253 查看
判断给定的点是否被一个CGRect包含,可以用CGRectContainsPoint函数 BOOL contains = CGRectContainsPoint(CGRect rect, CGPoint point); 判断一个CGRect是否包含再另一个CGRect里面,常用与测试给定的对象之间是否又重叠 BOOL contains = CGRectContainsRect(CGRect rect1, CGRect rect2); 判断两个结构体是否有交错.可以用CGRectIntersectsRect BOOL contains = CGRectIntersectsRect(CGRect rect1, CGRect rect2); float float_ = CGRectGetMaxX(CGRect rect);返回矩形右边缘的坐标 CGRectGetMaxY返回矩形顶部的坐标 CGRectGetMidX返回矩形中心X的坐标 CGRectGetMidY返回矩形中心Y的坐标 CGRectGetMinX返回矩形左边缘的坐标 CGRectGetMinY返回矩形底部的坐标 CGRectContainsPoint 看参数说明,一个点是否包含在矩形中,所以参数为一个点一个矩形
相关文章推荐
- 国外braintree支付手段配置以及使用
- xcode7.3 iTunes Store operation failed问题
- arcgis engine 监听element的添加、更新和删除事件(使用IGraphicsContainerEvents)
- Pku oj 1218 THE DRUNK JAILER(开灯问题)
- “selection does not contain a main type”解决方法
- NLTEST to test the trust relationship between a workstation and domain
- WARNING: The first attempt to start Xvnc failed, possibly because the font
- Pku oj 2027 No Brainer(水题)
- LeetCode笔记:217. Contains Duplicate
- 基于Alphabet剪枝的五子棋AI
- IAR之调试报错Flash verification failed.
- it.sauronsoftware.ftp4j.FTPException [code=426, message= Failure writing network stream.
- SGU 121 Bridges painting(构造)
- 单独使用explain plan
- linker command failed with exit code 1 (use -v to see invocation)
- xcode7 __weak 导致报错 is unavailable
- error: linker command failed with exit code 1 (use -v to see invocation)
- 使用苹果airport路由器的WDS功能扩展wifi覆盖范围的设置方法
- http://www.cnblogs.com/armyfai/p/3985660.html svn教程
- 文字记录,对话吴恩达(Andrew Ng):超级大咖深度解析人工智能的发展现状与未来