05 2016 档案
摘要:x轴旋转: CABasicAnimation *theAnimation; theAnimation=[CABasicAnimation animationWithKeyPath:@"transform.rotation.x"]; theAnimation.duration=8; theAnimat
阅读全文
摘要:解决方法: 1. CABasicAnimation *thisAnimation = [CABasicAnimtaion animationWithKeyPath:@"transform.rotation.z"]; thisAnimation.removedOnCompletion = NO; 2.
阅读全文
摘要:概述 由于ObjC主要基于Smalltalk进行设计,因此它有很多类似于Ruby、Python的动态特性,例如动态类型、动态加载、动态绑定等。今天我们着重介绍ObjC中的键值编码(KVC)、键值监听(KVO)特性: 键值编码KVC 我们知道在C#中可以通过反射读写一个对象的属性,有时候这种方式特别方
阅读全文
摘要:CABasicAnimation animationWithKeyPath Types When using the ‘CABasicAnimation’ from the QuartzCore Framework in Objective-C, you have to specify an ani
阅读全文
摘要:随着iPhone设备出现了不同的尺寸,iOS6.0以后storyboard和xib文件新增了一个Use Auto Layout选项,用来实现自动布局。当你勾选上这个选项,以前传统的布局方式将不能正常工作。一旦使用了自动布局,就要忘记 Frame 的概念! 要判断UIView是否可以使用自动布局,可以
阅读全文
摘要:CALayer属于Core Animation部分的内容,比较重要而不太好理解。以下是园子中看到的一篇文章的摘录: 以下摘自<<核心动画编程指南>>: 两者最大的区别是,图层不会直接渲染到屏幕上。 在模型-视图-控制器(model-view-controller)概念里面NSView和UIView是
阅读全文