当前位置: 首页 > news >正文

泉州建网站微信第三方网站怎么做

泉州建网站,微信第三方网站怎么做,国际新闻,同城推广平台CAAnimation和CALayer类扩展了NSKeyValueCoding协议#xff0c;给键添加默认值#xff0c;扩展了封装协议#xff0c;支持CGPoint、CGRect、CGSize和CATransform3D关键路径。1.1 键-值编码兼容的容器类CALayer和CAAnimation都是键-值编码兼容的容器类#xff0c;允许你修改… CAAnimation和CALayer类扩展了NSKeyValueCoding协议给键添加默认值扩展了封装协议支持CGPoint、CGRect、CGSize和CATransform3D关键路径。 1.1  键-值编码兼容的容器类   CALayer和CAAnimation都是键-值编码兼容的容器类允许你修改属性键对应的值。即使键为“someKey”对应的属性没有被定义你也可以给“someKey”的键设置一个值如下:   [theLayer setValue:[NSNumber numberWithInteger:50] forKey:someKey];   你可以通过下面的代码检索“someKey”对应的值:   someKeyValue[theLayer valueForKey:someKey];        Mac OS X 注意:在Mac OS X上面CALayer和CAAnimation类支持NSCoding协议会自动归档这些你设置的额外键。 1.2 支持默认值   核心动画添加的键值编码约定允许一个类在被使用时键没有被设置相应值的时候提供默认值。CALayer或CAAnimation支持该约定通过使用方法defaultValueForKey:。   为了给键提供默认值你创建相应的子类并重载defaultValueForKey:。子类实现相应的键参数检查并返回适当的默认值。清单1描述了一个实现defaultValueForKey:的例子它给masksToBounds提供新的默认值。   Listing 1  Example implementation of defaultValueForKey:   (id)defaultValueForKey:(NSString *)key{     if ([key isEqualToString:masksToBounds])          return [NSNumber numberWithBool:YES];     return [super defaultValueForKey:key];   }   1.3 封装约定   当使用键值编码方法访问属性而属性的值不支持标准键-值编码封装约定的对象(NSObject)时候你可以使用如下的封装约定:   CGPoint     NSValue   CGSize     NSValue   CGRect     NSValue   CGAffineTransform     NSAffineTransform (Mac OS X only)   CATransform3D     NSValue 1.4 支持结构字段的关键路径   CAAnimation提供支持使用关键路径访问选择的结构字段。这在为动画关键路径指定结构字段的时候非常有帮助同时你可以使用setValue:forKeyPath:和valueForKeyPath来设置和读取相应的值。   CATransform3D公开如下的字段:   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.z field.   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.      CGPoint公开如下字段:   x     The x component of the point.   y     The y component of the point.   CGSize公开如下字段   width     The width component of the size.   height     The height component of the size.   CGRect公开如下字段:   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.   你不可以通过Objective-C 2.0的属性方法来指定一个结构字段的关键路径。如下的代码是无法正常执行的:   myLayer.transform.rotation.x0;   相反你必须使用setValue:forKeyPath:或者valuForKeyPath:如下:   [myLayer setValue:[NSNumber numberWithInt:0] forKeyPath:transform.rotation.x]; 转自梦维http://www.dreamingwish.com/dream-2012/coreanimation-programming-guide-10-kvc.html
http://www.sadfv.cn/news/265697/

相关文章:

  • 东莞建设工程交易中心网站网站建设定金做什么会计分录
  • 个人网站备案转公司备案seo社区
  • ie建设企业网站进去无法显示互联网保险优势
  • 网站建设预算及准备深圳保障房申请条件2022
  • 郴州建设公司网站游戏推广赚钱
  • 嘉兴网站建设企业seo 推广教程
  • 移动网站开发教材昆山普立斯特做的有网站
  • 免费甜点网站模板下载找论文的免费网站
  • 深圳网站高端建设更多标签的适用场景
  • 长尾网站搜索引擎做安卓开发要去看哪些网站
  • 中英互译网站怎么做wordpress伪静态设置
  • 报社网站开发做什么wordpress 文章内容不显示
  • 2015做那个网站致富网站后台怎么做
  • 创新网站建设工作网站建站报价单
  • 金华兰溪网站建设建设网站那些公司好
  • 做网站的数据库的选择上海企业联系方式
  • lamp 做网站做外贸怎样打开国外网站
  • 摄影工作室网站源码四川建设厅网站
  • 海南平台网站建设平台深圳网站制作必推祥奔科技
  • wordpress建站过程制作视频的免费软件
  • 织梦网站查看原有文章软件生命周期七个阶段
  • 做视频特效的网站有哪些可信网站可信站点
  • 电子商务网站建设类论文公司做一个网站
  • 重庆好的网站制作公司网站关键词如何布局
  • 淡蓝黑色大气企业网站模板线上营销存在的问题
  • 网站域名怎么写好多渠道分销系统
  • 个人网站建设课程家乡网络推广方案
  • 江苏省住房城乡建设厅门户网站中职商务网站建设课件
  • 网站建设公司扬州深圳安全教育平台
  • 外贸信息发布平台专业关键词排名优化软件