做项目让做一个加载动画,一个圈圈在转中间加一个图片,网上有好多demo,这里我也自己写了一个,中间的图片可加可不加。其中主要用到贝塞尔曲线。UIBezierPath是对CGContextRef的进一步封装,不多说直接上代码:#import @interface CircleLoader : UIVi...
分类:
移动开发 时间:
2015-09-15 16:21:41
阅读次数:
194
饼图创建路径// 创建路径对象UIBezierPath* path = [UIBezierPath bezierPathWithArcCenter:[self viewCenter] radius:MIN(self.bounds.size.height, self.bounds.size.width...
分类:
其他好文 时间:
2015-09-14 00:30:41
阅读次数:
151
第一种加载方法- (void)drawRect:(CGRect)rect { UIBezierPath *backPath = [UIBezierPath bezierPath]; [backPath moveToPoint:CGPointMake(0, 0)]; [backPat...
分类:
其他好文 时间:
2015-09-01 21:30:22
阅读次数:
259
来自:http://blog.csdn.net/lgm252008/article/details/34819743 UIBezierPath通过 - (void)addArcWithCenter:(CGPoint)center radius:(CGFloat)radius startAngle:(CGFloat)startAngle endAngle:(CGFloat)endAn...
分类:
其他好文 时间:
2015-08-11 10:21:41
阅读次数:
123
要学习ios复杂的动画,要用到很多东西,你需要对一下类都有一定的了解。
1 CAyer以及其各个子类。2 CAAnimation以及其子类 3 UIBezierPath 4 CGContext 5 CATransform3D 5 UIView动画
一:绘制静态的图形
这个主要是我们在绘制一些静态的正方形,长方形,五角星或者更复杂的图形的需求 着我们需要用到CALer...
分类:
其他好文 时间:
2015-08-05 18:21:22
阅读次数:
229
1 + (UIBezierPath *)heartShape:(CGRect)originalFrame 2 { 3 CGRect frame = [self maximumSquareFrameThatFits:originalFrame]; 4 5 UIBezierP...
分类:
移动开发 时间:
2015-07-29 21:15:33
阅读次数:
377
貌似又忙忙碌碌得过了许久,今天过得还比较悠闲,刚好遇到一个问题:画圆角。不是四个圆角一起,而是制定某一个或几个圆角,这时layer.cornerRadius就不怎么好用了。对于这种情况,Stackoverflow上提供了几种解决方案。其中最简单优雅的方案,就是使用UIBezierPath。下面给出一...
分类:
移动开发 时间:
2015-07-29 19:04:53
阅读次数:
127
-(void)addRoundBorder:(UIView *)view{ CAShapeLayer * acircle = [CAShapeLayer layer]; acircle.path = [UIBezierPath bezierPathWithRoundedRect:view...
分类:
其他好文 时间:
2015-07-22 20:45:39
阅读次数:
102
[objc] view
plaincopyprint?
@interface UIView (RectCorner)
@end
@implementation UIView (RectCorner)
- (void)setCornerOnTop {
UIBezierPath *maskPath;
maskP...
分类:
其他好文 时间:
2015-07-07 09:38:37
阅读次数:
252
这段时间一直在探索一些新奇的事物,博客一直没有更新。今天我们来学一些好玩的东西。比如利用facebook的pop,做一个会动的贝塞尔曲线。废话不多说,来看看吧。
#import "Beisaier.h"
#import
@interface Beisaier ()
{
CAShapeLayer *layer1;
UIBezierPath *aPath1;
}
@end
...
分类:
移动开发 时间:
2015-07-03 14:12:22
阅读次数:
280