iphone ios CABasicAnimation animationWithKeyPath 一些规定的值
2012-02-04 11:33
459 查看
以下大家友情支持一下:
做了一个产品,需要人气支持一下,android和iphone上91市场搜索#super junior粉丝团#,或者直接到页面下载http://m.ixingji.com/m.html?p=X16,大家帮忙捧捧场。
原文:
https://developer.apple.com/library/ios/#documentation/Cocoa/Conceptual/CoreAnimation_guide/Articles/KVCAdditions.html
as well as setting and getting values using
You can not specify a structure field key path using Objective-C 2.0 properties. This will not work:
Instead you must use
shown below:
做了一个产品,需要人气支持一下,android和iphone上91市场搜索#super junior粉丝团#,或者直接到页面下载http://m.ixingji.com/m.html?p=X16,大家帮忙捧捧场。
原文:
https://developer.apple.com/library/ios/#documentation/Cocoa/Conceptual/CoreAnimation_guide/Articles/KVCAdditions.html
Key Path Support for Structure Fields
CAAnimationprovides support for accessing the fields of selected structures using key paths. This is useful for specifying these structure fields as the key paths for animations,
as well as setting and getting values using
setValue:forKeyPath:and
valueForKeyPath:.
CATransform3Dexposes the following fields:
Structure Field | Description |
---|---|
rotation.x | The rotation, in radians, in the x axis. |
rotation.y | The rotation, in radians, in the y axis. |
rotation.z | The rotation, in radians, in the z axis. |
rotation | The rotation, in radians, in the z axis. This is identical to setting the rotation.zfield. |
scale.x | Scale factor for the x axis. |
scale.y | Scale factor for the y axis. |
scale.z | Scale factor for the z axis. |
scale | Average of all three scale factors. |
translation.x | Translate in the x axis. |
translation.y | Translate in the y axis. |
translation.z | Translate in the z axis. |
translation | Translate in the x and y axis. Value is an NSSize or CGSize. |
CGPointexposes the following fields:
Structure Field | Description |
---|---|
x | The x component of the point. |
y | The y component of the point. |
CGSizeexposes the following fields:
Structure Field | Description |
---|---|
width | The width component of the size. |
height | The height component of the size. |
CGRectexposes the following fields:
Structure Field | Description |
---|---|
origin | The origin of the rectangle as a CGPoint. |
origin.x | The x component of the rectangle origin. |
origin.y | The y component of the rectangle origin. |
size | The size of the rectangle as a CGSize. |
size.width | The width component of the rectangle size. |
size.height | The height component of the rectangle size. |
myLayer.transform.rotation.x=0; |
setValue:forKeyPath:or
valueForKeyPath:as
shown below:
[myLayer setValue:[NSNumber numberWithInt:0] forKeyPath:@"transform.rotation.x"]; |
相关文章推荐
- iOS:CABasicAnimation animationWithKeyPath 一些规定的值
- iOS 动画(三)CABasicAnimation animationWithKeyPath 一些规定的值
- CABasicAnimation animationWithKeyPath 一些规定的值
- CABasicAnimation animationWithKeyPath 一些规定的值
- CABasicAnimation animationWithKeyPath 一些规定的值
- CABasicAnimation animationWithKeyPath 一些规定的值
- CABasicAnimation animationWithKeyPath 一些规定的值
- CABasicAnimation animationWithKeyPath 一些规定的值(Layer层动画)
- CABasicAnimation animationWithKeyPath 一些规定的值
- CABasicAnimation animationWithKeyPath 一些规定的值
- CABasicAnimation animationWithKeyPath 一些规定的值
- CABasicAnimation animationWithKeyPath 一些规定的值 .
- CABasicAnimation animationWithKeyPath 一些规定的值
- CABasicAnimation animationWithKeyPath 一些规定的值
- CABasicAnimation animationWithKeyPath 一些规定的值
- CABasicAnimation animationWithKeyPath 一些规定的值
- CABasicAnimation animationWithKeyPath 一些规定的值
- CABasicAnimation animationWithKeyPath 一些规定的值
- CABasicAnimation animationWithKeyPath 一些规定的值
- 动画 CABasicAnimation animationWithKeyPath 一些规定的值