随笔分类 -  Xcode--Code

时时刻刻提醒寄己记住一些代码,js源文件代码
摘要:自定义布局 UICollectionView——>可以想象成TableViewController //创建CollectionView对象,传布局参数 UICollectionView *collectionView = [[UICollectionView alloc] initWithFram 阅读全文
posted @ 2017-06-29 12:37 laugh 阅读(125) 评论(0) 推荐(0)
摘要:缓存处理 SDImageCache 拿出图片缓存的大小:[SDImageCache sharedImageCache].getSize; “%@“,NSTemporaryDirectory()这个方法直接获取沙盒地址; 🌹🌟自己写获取文件缓存大小: 1方法1; 1.文件对象:NSFileMana 阅读全文
posted @ 2017-06-28 16:40 laugh 阅读(1559) 评论(0) 推荐(0)
摘要:// // ViewController.m // 06-UIDynamic #import "ViewController.h" @interface ViewController () @property (weak, nonatomic) IBOutlet UIView *blueView; /** 物理仿真器 */ @property (nonatomic, strong) U... 阅读全文
posted @ 2017-06-08 14:35 laugh 阅读(175) 评论(0) 推荐(0)
摘要:// // ViewController.m // 键盘处理 // // Created by xiaomage on 15/7/23. // Copyright (c) 2015年 小码哥. All rights reserved. // #import "ViewController.h" #import "XMGKeyboardTool.h" @interface ... 阅读全文
posted @ 2017-05-16 09:42 laugh 阅读(516) 评论(0) 推荐(0)
摘要:10-动画组(了解) 11-UIView和核心动画区别 阅读全文
posted @ 2017-04-14 14:38 laugh 阅读(186) 评论(0) 推荐(0)
摘要:核心动画 08-核心动画-CAKeyFrameAnimation 阅读全文
posted @ 2017-04-14 14:34 laugh 阅读(248) 评论(0) 推荐(0)
摘要:04-CALayer新建图层(了解) 04-CALayer隐式动画 阅读全文
posted @ 2017-04-14 13:06 laugh 阅读(158) 评论(0) 推荐(0)
摘要:09-画板(小功能) 01-画板(图片处理) 02-画板(图片处理bug) 阅读全文
posted @ 2017-04-07 12:52 laugh 阅读(448) 评论(0) 推荐(0)
摘要:现搭建页面 07-手势解锁(按钮选中和连线) 阅读全文
posted @ 2017-04-07 12:40 laugh 阅读(200) 评论(0) 推荐(0)
摘要:02-图片裁剪 图片裁切 图片截屏 04-图片截取 05-图片擦除 阅读全文
posted @ 2017-04-07 12:31 laugh 阅读(444) 评论(0) 推荐(0)
摘要:雪花定时器 10-图形上下文状态栈 11-矩阵操作 阅读全文
posted @ 2017-04-07 12:17 laugh 阅读(179) 评论(0) 推荐(0)
摘要:// ViewController.m // 08-模仿UIImageView #import "ViewController.h" #import "XMGImageView.h" @interface ViewController () @property (nonatomic, strong) XMGImageView *imageV; @end @implementat... 阅读全文
posted @ 2017-04-07 12:13 laugh 阅读(156) 评论(0) 推荐(0)
摘要:06柱状图 07-绘制文字和图片 阅读全文
posted @ 2017-04-07 11:42 laugh 阅读(352) 评论(0) 推荐(0)
摘要:04-重绘-下载进度 自定义的ProgressView 阅读全文
posted @ 2017-04-07 10:23 laugh 阅读(192) 评论(0) 推荐(0)
摘要:抽屉效果: 观察(内容,事件):三个View,left,right,main;手势(Pan)滑动的时候(左划/右滑)改变View的位置/尺寸; 监听者模式:KVO 时刻监听对象的属性值的改变; [_mainV addObserver:self forKeyPath:keyPath(_mainV, f 阅读全文
posted @ 2017-04-05 16:39 laugh 阅读(225) 评论(0) 推荐(0)
摘要:利用UIGestureRecognizer,能轻松识别用户在某个view上面做的一些常见手势 UIGestureRecognizer是一个抽象类,定义了所有手势的基本行为,使用它的子类才能处理具体的手势 UITapGestureRecognizer(敲击) UIPinchGestureRecogni 阅读全文
posted @ 2017-04-05 16:29 laugh 阅读(253) 评论(0) 推荐(0)
摘要:// HMViewController.m // 02-事件传递(掌握) #import "HMViewController.h" @interface HMViewController () @end @implementation HMViewController - (void)viewDidLoad { [super viewDidLoad]; // Do a... 阅读全文
posted @ 2017-04-05 15:07 laugh 阅读(186) 评论(0) 推荐(0)
摘要:事件是不是系统事件,是系统事件交给代理处理(比如程序启动完成时交给代理开启一个runRoop); 不是系统事件就交给主窗口处理(keyWindow); 主窗口会在视图中找到最合适的视图来处理触摸事件; 事件传递的过程-事件处理的过程(谁能处理)---- 07-hitText练习1 当从storybo 阅读全文
posted @ 2017-04-05 12:56 laugh 阅读(304) 评论(0) 推荐(0)
摘要:在iOS中不是任何对象都能处理事件,只有继承了UIResponder的对象才能接收并处理事件。我们称之为“响应者对象” UIApplication、UIViewController、UIView都继承自UIResponder,因此它们都是响应者对象,都能够接收并处理事件 默认View是不支持多手指操 阅读全文
posted @ 2017-04-05 12:36 laugh 阅读(191) 评论(0) 推荐(0)
摘要:Modal的简单使用 通过storyboard Modal 操作 默认拖出来的控制器有时候是不好使的,删掉自己重新拖一个, 通过stroyboard Modal出来的控制器;只能通过代码dismiss, Segue对象页面跳转: 调用Segue对象的- (void)perform;方法开始执行页面跳 阅读全文
posted @ 2017-04-05 11:38 laugh 阅读(201) 评论(0) 推荐(0)