2015年3月19日

iOS-Core-Animation-Advanced-Techniques(一)总结

摘要: CALayer的寄宿图(即图层中包含的图)CALayer 属性1.contents:layer.contents=(__bridgeid)image.CGImage;2.contentGravity:同UIView contentModecontentsGravity的目的是为了决定内容在图层的边界... 阅读全文

posted @ 2015-03-19 12:43 Jason_Luo 阅读(204) 评论(0) 推荐(0)

2015年3月2日

IOS开发之格式化日期时间(转)

摘要: 在开发iOS程序时,有时候需要将时间格式调整成自己希望的格式,这个时候我们可以用NSDateFormatter类来处理。例如://实例化一个NSDateFormatter对象NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]... 阅读全文

posted @ 2015-03-02 15:30 Jason_Luo 阅读(245) 评论(0) 推荐(0)

2015年1月30日

Core Graphics 教程:曲线和层(翻译 raywenderlich)

摘要: 欢迎来到Core Graphics 教程系列!在这个系列中,你将学到如何开始使用Core Graphics-通过练习例子)在教程一,二和三种,你学到如何定做一个tableview,只是用Core Graphics。在教程四种,你学到如何创建重复的patterns通过非常少的代码。在这个教程中,你将学... 阅读全文

posted @ 2015-01-30 16:53 Jason_Luo 阅读(369) 评论(0) 推荐(0)

显式动画Animation<转>

摘要: 当需要对非Root Layer进行动画或者需要对动画做更多自定义的行为的时候,就必须使用到显式动画了,显式动画的基类为CAAnimation,常用的是CABasicAnimation,CAKeyframeAnimation有时候还会使用到CAAnimationGroup,CATransition(注... 阅读全文

posted @ 2015-01-30 12:44 Jason_Luo 阅读(129) 评论(0) 推荐(0)

2015年1月23日

QuartzCore 框架介绍(原创 翻译Apple文档)

摘要: 支持图像处理和视频图像处理。CAAnimation:NSObjectCAAnimation 是一个动画抽象类。CAAnimationGroup:CAAnimation:NSObjectCAAnimationGroup 允许多个动画编组并且同时执行。CAPropertyAnimation:CAAnim... 阅读全文

posted @ 2015-01-23 18:01 Jason_Luo 阅读(335) 评论(0) 推荐(0)

2015年1月9日

iOS 8 Spring Animation

摘要: Spring Animation 简介Spring Animation 本质上是一种特殊的动画曲线,自从 iOS 7 开始被广泛应用在系统动画中。下图中演示的自带的动画效果实际上都使用了 Spring Animation:事实上,从 iOS 7 起几乎所有的系统动画都用的是 Spring Anima... 阅读全文

posted @ 2015-01-09 11:45 Jason_Luo 阅读(215) 评论(0) 推荐(0)

2014年12月24日

CAGradientLayer 透明渐变注意地方(原创)

摘要: CAGradientLayer *newShadow = [[CAGradientLayer alloc] init]; //添加渐变的颜色组合 newShadow.colors = [NSArray arrayWithObjects: (id)[[[UIColor co... 阅读全文

posted @ 2014-12-24 14:37 Jason_Luo 阅读(463) 评论(0) 推荐(0)

2014年12月22日

关于无符号整型和浮点数四舍五入容易引发错误的地方(原创)

摘要: NSMutableArray *ar = [[NSMutableArray alloc]init]; for (int i = 0; i<[ar count]-1; i++) { NSLog(@"test:%d",i); }由于 [ar count] 返回为 无符号类型,[ar coun... 阅读全文

posted @ 2014-12-22 12:07 Jason_Luo 阅读(628) 评论(0) 推荐(0)

2014年12月8日

Put checkmark in the left side of UITableViewCell

摘要: link:http://stackoverflow.com/questions/8755506/put-checkmark-in-the-left-side-of-uitableviewcell@"\u2611", @"\u2B1C", @"\u2705", @"\u26AB", @"\u26AA"... 阅读全文

posted @ 2014-12-08 11:16 Jason_Luo 阅读(178) 评论(0) 推荐(0)

2014年12月5日

gcd 注意地方 (原创)

摘要: 修改block之外的变量默认情况下,在程序块中访问的外部变量是复制过去的,即写操作不对原变量生效。但是你可以加上 __block来让其写操作生效,示例代码如下:123456 __block int a = 0; void (^foo)(void) = ^{ a = 1; } foo();... 阅读全文

posted @ 2014-12-05 16:04 Jason_Luo 阅读(164) 评论(0) 推荐(0)

导航