- 博客(8)
- 资源 (1)
- 收藏
- 关注
原创 iOS实现颜色渐变的几种方法
1. CAGradientLayer实现渐变2. Core Graphics相关方法实现渐变3. 以CAShapeLayer作为layer的mask属性
2016-10-18 16:25:19
3413
转载 文章标题
最近在看Sam Davies写的iOS7系列文章(http://www.shinobicontrols.com/blog/posts/2013/09/19/introducing-ios7-day-by-day),非常有意思,以此为契机准备系统的学习一下iOS7的新特性, 今天是第一篇总结:UIDynamics。 UIDynamics的作用 在iOS7之前, 想要实现动画功能只有通过CoreAn
2016-02-02 16:56:30
334
原创 动画 Animation
1. 隐式动画:修改layer的某属性,默认生成一个动画,动画的时间等属性是默认的,如时间为0.25s,可以用CATransaction进行修改。theLayer.opacity = 0.0;2. 显式动画:手动生成CABasicAnimation等animation类,设置所需的动画属性,然后将其添加到layer上生成animation:animationWithKeyPath:,keyPath
2016-01-31 20:17:39
902
原创 图层Layer
图层Layer1. layer不做实际的绘制,捕获app所提供的内容缓存在一个bitmap中,也可赋值layer的contents属性 Most layers do not do any actual drawing in your app. Instead, a layer captures the content your app provides and caches it in a bi
2016-01-31 20:15:08
989
原创 CGContext 总结二
CGContext 总结二CGContext中的transform1.1 用法CGContextScaleCTM(ref, 1.0, -1.0)表示缩放,为负数时,整个翻转; CGContextRotateCTM(ref, 180 * M_PI/180)表示旋转,rotate的方向,为正时,旋转方向为从x轴到y轴,负则相反; CGContextTranslateCTM(ref, 0, -400)
2016-01-31 20:08:23
777
原创 CGContext 总结
CGContext 总结1.画图获取context1.1 从drawRect:函数构造context- (void)drawRect:(CGRect)rect { // Drawing code CGContextRef ref = UIGraphicsGetCurrentContext(); CGContextSetFillColorWithColor(ref, [UIColo
2016-01-17 21:05:00
1234
原创 View Programming Guide 总结
View Programming Guide 总结1.所有有关View的transform操作都是相关于view的center,非frame When modifying the transform property of your view, all transformations are performed relative to the center point of the view.
2016-01-17 17:09:46
520
很好的用于提高ios能力工程demo
2015-03-23
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人