UIView之exclusiveTouch、clipsToBounds、transform属性
来源:互联网 发布:linux top 参数 编辑:程序博客网 时间:2024/04/28 16:09
来自:http://jordy.easymorse.com/?p=838
1、UIView 的exclusiveTouch属性
exclusiveTouch的意思是UIView会独占整个Touch事件,具体的来说,就是当设置了exclusiveTouch的UIView是事件的第一响应者,那么到你的所有手指离开前,其他的视图UIview是不会响应任何触摸事件的,对于多点触摸事件,这个属性就非常重要,值得注意的是:手势识别(GestureRecognizers)会忽略此属性。
列举用途:我们知道ios是没有GridView视图的,通常做法是在UITableView的cell上加载几个子视图,来模拟实现GridView视图,但对于每一个子视图来说,就需要使用exclusiveTouch,否则当同时点击多个子视图,那么会触发每个子视图的事件。
2、UIView 的clipsToBounds属性
clipsToBounds的意思是指当子视图的的一部分超出父视图,会被剪切掉,默认不设置此属性,当子视图一部分超出父视图,但超出的部分任然会被绘制,只是超出的部分不会响应事件。
3、UIView的transform属性
通常我们使用transform属性做一些UIView的旋转,缩放的动画,tranform中包含以下属性:rotation,scale,translation,这三个属性又包含各自的x,y,z 例如
CABasicAnimation *
theAnimation=[CABasicAnimation animationWithKeyPath:@"transform.rotation.x"
];
上述代码意思是指,transform围绕x轴(屏幕的水平方向)旋转,如果上述代码“
transform.rotation.y
”围绕y轴(屏幕的竖直方向)旋转,同理,上述代码“transform.rotation.z
”围绕z轴(也就是垂直于屏幕的方向)旋转,
scale表示缩放的属性,translation表示平移的属性。
- UIView之exclusiveTouch、clipsToBounds、transform属性
- UIView之exclusiveTouch、clipsToBounds、transform属性
- UIView 的exclusiveTouch属性
- iOS-UIView属性之clipsToBounds
- UIView的clipsToBounds属性
- UIView的clipsTobounds属性
- UIView的clipsTobounds属性
- UIView的clipsTobounds属性
- UIView的clipsTobounds属性
- UIView的clipsTobounds属性
- UIView的clipsTobounds属性
- UIView的clipsTobounds属性
- UIView的clipsTobounds属性
- UIView的clipsTobounds属性
- UIView的clipsTobounds属性
- UIView clipsToBounds属性
- UIView的clipsTobounds属性
- UIView属性clipsTobounds的应用
- 用户抓log引导!请仔细观看哈~
- 供应电话吸费项目 让您轻松赚钱
- html基础知识
- 拓扑排序
- HDU 2090 算菜价
- UIView之exclusiveTouch、clipsToBounds、transform属性
- 【数据库视频】总结
- 项目经验
- mongo db backup 1
- 稳定性测试观察点列表,参考
- MyEclipse开发WebService教程
- JPA 复合主键
- uva11991:一串数中第k个n的位置 FROM shu
- ant在linux下的配置