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

浙公网安备 33010602011771号