摘要: UIGestureRecognizer: 1.locationinView 获取手势在某个视图里面的坐标位置 2.delegate监听手势的行为 3.state状态 开始:UIGestureRecognizerStateBegan 手势达到要求 识别:UIGestureRecognizerState 阅读全文
posted @ 2016-01-29 12:26 王权 阅读(191) 评论(0) 推荐(0) 编辑
摘要: 效果图首先你得画出这只眼睛,这是眼睛包括5个部分组成:1 @property (strong, nonatomic) CAShapeLayer *eyeFirstLightLayer;2 @property (strong, nonatomic) CAShapeLayer *eyeSecondLig... 阅读全文
posted @ 2016-01-26 20:55 王权 阅读(252) 评论(0) 推荐(0) 编辑
摘要: #import "ViewController.h"@interface ViewController ()@property (nonatomic,strong) CALayer *hourLayer;@property (nonatomic,strong) CALayer *minLayer;@... 阅读全文
posted @ 2016-01-25 19:57 王权 阅读(117) 评论(0) 推荐(0) 编辑
摘要: //显隐 CABasicAnimation *capacityAnimation = [CABasicAnimation animationWithKeyPath:@"opacity"]; capacityAnimation.fromValue = @1; capacityAnimation.t... 阅读全文
posted @ 2016-01-25 18:47 王权 阅读(122) 评论(0) 推荐(0) 编辑
摘要: 1.头尾式动画开启动画[UIView beginAnimations:nil context:nil];设置动画执行时间[UIView setAnimationDuration:0.5];---动画的内容---提交动画[UIView commitAnimations];2.block式动画[UIVi... 阅读全文
posted @ 2016-01-24 22:39 王权 阅读(147) 评论(0) 推荐(0) 编辑
摘要: 1.KVCKVC是Key-Value-Coding的简称,它是一种可以直接通过字符串的名 字(key)来访问类属性(实例变量)的机制。而不是通过调用Setter、Getter方法访问。当使用KVO、Core Data、CocoaBindings、AppleScript(Mac支持)时,KVC是关键技... 阅读全文
posted @ 2016-01-24 22:38 王权 阅读(126) 评论(0) 推荐(0) 编辑
摘要: 1.单例模式的要点: 显然单例模式的要点有三个;一是某个类只能有一个实例;二是它必须自行创建这个实例;三是它必须自行向整个系统提供这个实例。2.单例模式的优点: 1.实例控制:Singleton 会阻止其他对象实例化其自己的 Singleton 对象的副本,从而确保所有对象都访问唯一实例。 2... 阅读全文
posted @ 2016-01-24 22:35 王权 阅读(143) 评论(0) 推荐(0) 编辑
摘要: 一.ImageView实现旋转小动画注意:参数为弧度,不要忘记除数加.0[UIViewanimateWithDuration:0.3animations:^{ self.addImageView.transform=CGAffineTransformMakeRotation(45/180.0*M... 阅读全文
posted @ 2016-01-22 10:49 王权 阅读(232) 评论(0) 推荐(0) 编辑
摘要: UITabBarController是IOS中很常用的一个viewController。UITabBarController通常作为整个程序的rootViewController,而且不能添加到别的container viewController中.一.创建最常见的创建UITabBarControl... 阅读全文
posted @ 2016-01-22 10:48 王权 阅读(176) 评论(0) 推荐(0) 编辑
摘要: 1.contentModeview.contentMode = UIViewContentModeScaleAspectFill;2.是否实现触摸 3.简单实现动画 图片的名字为campFire01-campFire17 NSMutableArray * imagearray = [NSMutabl... 阅读全文
posted @ 2016-01-19 20:28 王权 阅读(179) 评论(0) 推荐(0) 编辑