上一页 1 ··· 11 12 13 14 15 16 17 18 19 ··· 29 下一页

2017年3月22日

IOS 自定义Layer(图层)

摘要: 方式2: NJLayer.h / .m @implementation NJLayer // 重写该方法, 在该方法中给layer上绘制图形 // 注意CALayer中的drawInContext方法, 不会自动调用 // 只能自己通过setNeedDisplay方法调用 - (void)drawI 阅读全文

posted @ 2017-03-22 13:14 守望星空 阅读(210) 评论(0) 推荐(0) 编辑

IOS CALayer基本使用 (图层)

摘要: ● 其实UIView之所以能显示在屏幕上,完全是因为它内部的一个图层(CALayer) ● 在创建UIView对象时,UIView内部会自动创建一个图层(即CALayer对象),通过UIView 的layer属性可以访问这个层 @property(nonatomic,readonly,retain) 阅读全文

posted @ 2017-03-22 13:11 守望星空 阅读(269) 评论(0) 推荐(0) 编辑

IOS 拖拽事件(手势识别)

摘要: @interface NJViewController () @property (weak, nonatomic) IBOutlet UIView *customView; @end @implementation NJViewController - (void)viewDidLoad { [super viewDidLoad]; UIPanGestureRecog... 阅读全文

posted @ 2017-03-22 12:56 守望星空 阅读(243) 评论(0) 推荐(0) 编辑

IOS 旋转+缩放(手势识别)

摘要: @interface NJViewController () @property (weak, nonatomic) IBOutlet UIImageView *iconView; @end @implementation NJViewController - (void)viewDidLoad { [super viewDidLoad]; [self pic... 阅读全文

posted @ 2017-03-22 12:52 守望星空 阅读(216) 评论(0) 推荐(0) 编辑

IOS 长按+轻扫(手势识别)

摘要: @interface NJViewController () @property (weak, nonatomic) IBOutlet UIView *customView; @end @implementation NJViewController - (void)viewDidLoad { [super viewDidLoad]; // 向上 UI... 阅读全文

posted @ 2017-03-22 12:44 守望星空 阅读(648) 评论(0) 推荐(0) 编辑

IOS 绘制画画板(封装上下文)

摘要: 封装上下文 UIImage (CaptureView).h / .m @interface UIImage (CaptureView) + (UIImage *)captureImageWithView:(UIView *)view; @end #import "UIImage+captureVie 阅读全文

posted @ 2017-03-22 11:13 守望星空 阅读(157) 评论(0) 推荐(0) 编辑

IOS 截屏(保存到相册中)

摘要: @interface NJViewController () /** * 点击截屏按钮 */ - (IBAction)captureView:(UIButton *)sender; /** * 白色view */ @property (weak, nonatomic) IBOutlet UIView *customView; @end @implementation NJ... 阅读全文

posted @ 2017-03-22 11:05 守望星空 阅读(252) 评论(0) 推荐(0) 编辑

IOS 九宫图解锁(封装)

摘要: NJLockView.h /.m @class NJLockView; @protocol NJLockViewDelegate <NSObject> - (void)lockViewDidClick:(NJLockView *)lockView andPwd:(NSString *)pwd; @e 阅读全文

posted @ 2017-03-22 10:52 守望星空 阅读(184) 评论(0) 推荐(0) 编辑

IOS 响应者链条 and UIGestureRecognizer 手势识别器)

摘要: 一次完整的触摸事件的传递响应的过程 UIAppliction --> UIWiondw -->递归找到最适合处理事件的控件 控件调用touches方法-->判断是否实现touches方法-->没有实现默认会将事件传递给上一个响应者-->找到上一个响应者 1.响应者链条: 由很多响应者链接在一起组合起 阅读全文

posted @ 2017-03-22 10:35 守望星空 阅读(229) 评论(0) 推荐(0) 编辑

IOS view拖拽(触摸事件)

摘要: • iOS中的事件可以分为3大类型 触摸事件 加速计事件 远程控制事件 响应者对象 • 在iOS中不是任何对象都能处理事件,只有继承了UIResponder的对象才能接收并处理事 件。我们称之为“响应者对象” • UIApplication、UIViewController、UIView都继承自UI 阅读全文

posted @ 2017-03-22 10:09 守望星空 阅读(2216) 评论(0) 推荐(0) 编辑

上一页 1 ··· 11 12 13 14 15 16 17 18 19 ··· 29 下一页

导航