iOS-学习
文章平均质量分 90
xiaochaofeiyu
这个作者很懒,什么都没留下…
展开
-
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 · 482 阅读 · 0 评论 -
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 · 1174 阅读 · 0 评论 -
图层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 · 938 阅读 · 0 评论 -
动画 Animation
1. 隐式动画:修改layer的某属性,默认生成一个动画,动画的时间等属性是默认的,如时间为0.25s,可以用CATransaction进行修改。theLayer.opacity = 0.0;2. 显式动画:手动生成CABasicAnimation等animation类,设置所需的动画属性,然后将其添加到layer上生成animation:animationWithKeyPath:,keyPath原创 2016-01-31 20:17:39 · 826 阅读 · 0 评论 -
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 · 710 阅读 · 0 评论 -
iOS 动画 - 波纹 声波 水波
iOS 动画 波纹 声波 水波 海水 ripple原创 2016-09-18 09:51:37 · 7129 阅读 · 1 评论 -
iOS实现颜色渐变的几种方法
1. CAGradientLayer实现渐变2. Core Graphics相关方法实现渐变3. 以CAShapeLayer作为layer的mask属性原创 2016-10-18 16:25:19 · 3352 阅读 · 0 评论