01 2016 档案
摘要://: Playground - noun: a place where people can play import UIKit // 创建一个枚举类型就相当于创建了一个新的数据类型, 所以首字母应该大写 enum GameEnding { case win case lose case draw
阅读全文
摘要://: Playground - noun: a place where people can play import UIKit // 值类型:指的是当一个变量赋值给另外一个变量的时候, 是copy一个副本 // 两个变量之间互不影响, 也就是说, 另外一个变量的值改变, 不会影响到另外一个变量
阅读全文
摘要://: Playground - noun: a place where people can play import UIKit // 初始化一个整数数组 var arr = [1, 3, 5, 7, 8, 10, 12, 2, 0, 11, 9] // 闭包原始模样 arr.sort(){(a:
阅读全文
摘要://: Playground - noun: a place where people can play import UIKit // 初始化一个整数数组 var arr = [1, 3, 5, 7, 8, 10, 12, 2, 0, 11, 9] // 排序, 默认是从小到大排序 arr.sor
阅读全文
摘要://: Playground - noun: a place where people can play import UIKit // 初始化一个整数数组 var arr = [1, 3, 5, 7, 8, 10, 12, 2, 0, 11, 9] // 排序, 默认是从小到大排序 arr.sor
阅读全文
摘要:效果图: #import "ViewController.h" #import <POP.h> @interface ViewController () @property (nonatomic, weak) UIView *testView; @end @implementation ViewCo
阅读全文
摘要:效果图: #import "ViewController.h" #import <POP.h> @interface ViewController () @end @implementation ViewController - (void)viewDidLoad { [super viewDidL
阅读全文
摘要:POP动画引擎是facebook提供的一个开源框架, 可以实现很多的动画效果, 这里就不一一介绍啦, 有兴趣的童鞋请移步:https://github.com/facebook/pop下面简单的讲一下POP动画引擎中Layer与CALayer的区别:这里, 代码做的都是同一个效果: 执行位移动画3秒...
阅读全文
摘要:CADisplayLink类似NSTimer是一个定时器,只不过是一秒会调用60次指定的方法使用方法:#import "ViewController.h"@interface ViewController ()@property (nonatomic, strong) CADisplayLink *...
阅读全文
摘要:效果图: 代码部分: RPGradientAnimationView.h #import <UIKit/UIKit.h> typedef enum : NSUInteger { RPGradientAnimationViewColorDirectionUpToDown = 1, // 从上到下 RP
阅读全文
摘要:效果图:github:https://github.com/RinpeChen/CAGradientLayerBasicDemo
阅读全文
摘要:通过修改CAShapeLayer的StrokeStart与StrokeEnd的值来实现画图动画 效果图: 代码部分: #import "ViewController.h" @interface ViewController () @property (nonatomic, strong) CASha
阅读全文
摘要:CAShapeLayer是基于贝塞尔曲线而存在的, 如果没有贝塞尔曲线提供路径来画出图形, CAShapeLayer就没有存在的意义, CAShapeLayer可以使得不用在drawRect:方法中实现画图. 另外, CAShapeLayer是属于CoreAnimation框架的, 是基于GPU的来
阅读全文
摘要:效果图: 代码部分: #import "ViewController.h" @interface ViewController () @property (nonatomic, strong) CALayer *imageLayer; @property (nonatomic, strong) CA
阅读全文
摘要:由于直接更改layer的contents显示的隐式动画切换的时候的动画持续时间没办法控制, 切换效果不尽人意,所以这里配合了CABasicAnimation实现淡入淡出的切换效果,另外还可以使用组合动画对多种动画进行组合, 实现更复杂的动画效果, 这里仅仅只是多添加了缩放效果为示例...效果图:Vi...
阅读全文
摘要:效果图: 代码部分: #import "ViewController.h" @interface ViewController () @end @implementation ViewController - (void)viewDidLoad { [super viewDidLoad]; // 创
阅读全文
摘要:ViewController.m#import "ViewController.h"@implementation ViewController- (void)viewDidLoad { [super viewDidLoad]; /* 初始化layer */ // ...
阅读全文
摘要:provisioning profile path:~/Library/MobileDevice/Provisioning Profiles打开并日期排序,删除老的 provisioning profile 文件即可
阅读全文
摘要:git add -A stages All git add . stages new and modified, without deleted git add -u stages modified and deleted, without new
阅读全文
摘要:起初我在我的项目中先接入了AlipaySDK,没有出现什么问题,之后想要接入淘宝SDK之后,就出现了duplicate symbols for architecture i386的错误经过一段时间排错,解决方法如下:可以看到,两个SDK中都包含了AlipaySDK.bundle和AlipaySDK....
阅读全文
摘要:xcode中 有时候会报一个警告:[WARN]Warning: Multiple build commands for output file /xxx要解决这个问题很简单:1.选择你的工程2.选择target3.点击 Build Phases4.展开Copy Bundle Resources5.删...
阅读全文
摘要:MainTabBarViewController *mainCtrl = [[MainTabBarViewController alloc] init];LeftViewController *leftMenuViewController = [[LeftViewController alloc] ...
阅读全文
摘要:出现这个提示是由于以下原因造成:这里我用到了MJExtension将字典转为模型,但再转为模型的时候,出现这个提示,原因就是因为NSInteger后面多一个一个“*”@property (nonatomic,assign) NSInteger *star;改为:@property(nonatomic...
阅读全文
摘要:@property(nonatomic) BOOLscrollsToTop 这个属性在起作用 默认是YES// When the user taps the status bar, the scroll view beneath the touch which is closest to the s...
阅读全文
摘要:这个提示并不是出错,不理会它我的程序也没出现什么问题但是处于强迫症,还是努力寻找解决的方法。。。最终发现问题如下:在xib各种绘制和添加约束的UITableViewCell之后,在某一特定情况想要隐藏这个Cell,于是我就在UITableView的- (CGFloat)tableView:(UITa...
阅读全文
摘要:[!] `` attempted to initialize an object with an unknown UUID. `0B6359431C33CA0200C80C5D` for attribute: `files`. This can be the result of a merge an...
阅读全文
摘要://// RPProgressView.h// CALayer定制下载进度条控件//// Created by RinpeChen on 16/1/2.// Copyright © 2016年 rinpe. All rights reserved.//#import @interface R...
阅读全文

浙公网安备 33010602011771号