iOS 2D 畫圖 和 UIBezierPath

屏幕快照 2016-01-15 下午4.37.04.png

****注意一點是set 和setFill的區(qū)別

-(void)drawRect:(CGRect)rect{
    UIColor *fillColor = [UIColor orangeColor];
    [fillColor setFill];
    
    UIBezierPath *path = [UIBezierPath bezierPath];
    //setting the starting point of shape
    [path moveToPoint:CGPointMake(100+30, 100+0)];
    
    //draw the lines
    [path addLineToPoint:CGPointMake(200+30, 100+40.0)];
    [path addLineToPoint:CGPointMake(160.0+30, 100+140.0)];
    [path addLineToPoint:CGPointMake(40.0+30, 100+140.0)];
    [path addLineToPoint:CGPointMake(0.0+30, 100+40.0)];
    [path closePath];
    [path fill];
 }
屏幕快照 2016-01-15 下午5.27.25.png
-(void)drawRect:(CGRect)rect{
    UIColor *fillColor = [UIColor orangeColor];
    [fillColor set];

    UIBezierPath *path = [UIBezierPath bezierPath];
    path.lineWidth =  5;
    path.lineJoinStyle = kCGLineCapRound;
    path.lineCapStyle = kCGLineCapRound;

    [path moveToPoint:CGPointMake(100, 20)];
    
    [path addLineToPoint:CGPointMake(200+30, 100+40.0)];
    [path addLineToPoint:CGPointMake(160.0+30, 100+140.0)];
    [path addLineToPoint:CGPointMake(40.0+30, 100+140.0)];
    [path addLineToPoint:CGPointMake(0.0+30, 100+40.0)];
    [path addLineToPoint:CGPointMake(100, 20)];
    [path stroke];
}
屏幕快照 2016-01-15 下午4.51.23.png

周長= 2πradius

define   DEGREES_TO_RADIANS(degrees)  (M_PI * degrees/ 180)
-(void)drawRect:(CGRect)rect{
    UIBezierPath *path = [UIBezierPath bezierPathWithArcCenter:CGPointMake(100,100) radius:100 startAngle:0 endAngle:DEGREES_TO_RADIANS(135) clockwise:YES];
    [path closePath];
    [path fill];//填充區(qū)域
}
屏幕快照 2016-01-15 下午5.12.40.png
-(void)drawRect:(CGRect)rect{
  
  UIBezierPath *path = [UIBezierPath bezierPathWithArcCenter:CGPointMake(100,100) radius:100 startAngle:0 endAngle:DEGREES_TO_RADIANS(135) clockwise:YES];
    path.lineWidth = 5;
    path.lineCapStyle = kCGLineCapRound;
    path.lineJoinStyle = kCGLineCapRound;
    [path stroke];
}

Adding Curves to Your Path//添加曲線

//由控制點和控制點的切線點決定


curve_segments_2x.png
屏幕快照 2016-01-15 下午5.17.39.png
-(void)drawRect:(CGRect)rect{
    UIColor *fillColor = [UIColor orangeColor];
    [fillColor set];

    //繪制二次貝賽爾曲線
    UIBezierPath *path = [UIBezierPath bezierPath];
    path.lineWidth = 5;
    path.lineCapStyle = kCGLineCapRound;
    path.lineJoinStyle = kCGLineCapRound;
    //setting start point
    [path moveToPoint:CGPointMake(20, 100)];
    //setting end point                              control point(中間控制點)
    [path addQuadCurveToPoint:CGPointMake(120, 100) controlPoint:CGPointMake(70, 300)];
    
    [path stroke];
    
}
屏幕快照 2016-01-15 下午5.29.06.png
-(void)drawRect:(CGRect)rect{
    UIColor *fillColor = [UIColor orangeColor];
    [fillColor set];
    
    //繪制二次貝賽爾曲線
    UIBezierPath *path = [UIBezierPath bezierPath];
    path.lineWidth = 5;
    path.lineCapStyle = kCGLineCapRound;
    path.lineJoinStyle = kCGLineCapRound;
    //setting start point
    [path moveToPoint:CGPointMake(20, 100)];
    //setting end point                              control point(中間控制點)
    [path addQuadCurveToPoint:CGPointMake(120, 100) controlPoint:CGPointMake(70, 300)];
    
    [path stroke];
    [path fill];
}
屏幕快照 2016-01-15 下午5.33.07.png
-(void)drawRect:(CGRect)rect{

    UIColor *color = [UIColor orangeColor];
    [color set];
    
    //繪制3次貝賽爾曲線
    
    UIBezierPath *path = [UIBezierPath bezierPath];
    
    path.lineWidth = 5;
    path.lineJoinStyle = kCGLineCapRound;
    path.lineCapStyle = kCGLineCapRound;
    
    [path moveToPoint:CGPointMake(20, 50)];
    
    [path addCurveToPoint:CGPointMake(300, 50) controlPoint1:CGPointMake(100, 0) controlPoint2:CGPointMake(200, 400)];
    
    [path stroke];
    
}
屏幕快照 2016-01-15 下午5.34.42.png
-(void)drawRect:(CGRect)rect{

    UIColor *color = [UIColor orangeColor];
    [color set];
    
    //繪制3次貝賽爾曲線
    
    UIBezierPath *path = [UIBezierPath bezierPath];
    
    path.lineWidth = 5;
    path.lineJoinStyle = kCGLineCapRound;
    path.lineCapStyle = kCGLineCapRound;
    
    [path moveToPoint:CGPointMake(20, 50)];
    
    [path addCurveToPoint:CGPointMake(300, 50) controlPoint1:CGPointMake(130, 0) controlPoint2:CGPointMake(200, 400)];

    [path stroke];
    [path fill];
}

Modifying the Path Using Core Graphics Functions-->使用core graphic 來修改

屏幕快照 2016-01-15 下午5.54.38.png
-(void)drawRect:(CGRect)rect{

    //根據坐標畫出一個內切圓
    UIBezierPath *PATH  = [UIBezierPath bezierPathWithOvalInRect:CGRectMake(0, 0, 100, 200)];
    [[UIColor blackColor]setStroke];
    [[UIColor orangeColor] setFill];
    
    CGContextRef ref = UIGraphicsGetCurrentContext();
    // 在視圖中的坐標
    CGContextTranslateCTM(ref,100, 100);
    PATH.lineWidth = 5;
    [PATH fill];
    [PATH stroke];    
}

//根據一個矩形畫曲線

  • (UIBezierPath *)bezierPathWithRect:(CGRect)rect

//根據矩形框的內切圓畫曲線

  • (UIBezierPath *)bezierPathWithOvalInRect:(CGRect)rect

//根據矩形畫帶圓角的曲線

  • (UIBezierPath *)bezierPathWithRoundedRect:(CGRect)rect cornerRadius:(CGFloat)cornerRadius

//在矩形中悔叽,可以針對四角中的某個角加圓角

  • (UIBezierPath *)bezierPathWithRoundedRect:(CGRect)rect byRoundingCorners:(UIRectCorner)corners cornerRadii:(CGSize)cornerRadii;


    屏幕快照 2016-01-15 下午5.59.20.png
    UIBezierPath *PATH  = [UIBezierPath bezierPathWithRoundedRect:CGRectMake(0, 0, 100, 200)byRoundingCorners:UIRectCornerBottomLeft|UIRectCornerBottomRight cornerRadii:CGSizeMake(40, 10)];

-----------CoreGraphics--------------------

屏幕快照 2016-01-19 上午10.07.06.png
-(void)drawRect:(CGRect)rect{
    CGMutablePathRef path = CGPathCreateMutable();
    CGRect rectOne = CGRectMake(10, 10, 200, 300);
    CGRect rectTwo = CGRectMake(40, 100, 90, 300);
    CGRect rects[2] = {rectOne,rectTwo};
//    CGPathAddRect(path, NULL, rectOne); 一個矩形 下面是兩個矩形的情況
    CGPathAddRects(path, NULL, (const CGRect *)&rects, 2);
    
    CGContextRef current = UIGraphicsGetCurrentContext();
    CGContextAddPath(current, path);
    [[UIColor orangeColor]setFill];
    [[UIColor purpleColor]setStroke];
    CGContextSetLineWidth(current, 5);
    CGContextDrawPath(current, kCGPathFillStroke);    
    CGPathRelease(path);
}
屏幕快照 2016-01-19 上午10.20.52.png
-(void)drawRect:(CGRect)rect{
    CGContextRef currentRef = UIGraphicsGetCurrentContext();
    CGContextSetShadowWithColor(currentRef, CGSizeMake(10, 10), 20.f, [UIColor redColor].CGColor);
    
    CGMutablePathRef path = CGPathCreateMutable();
    CGPathAddRect(path, NULL, CGRectMake(55, 60, 150, 150));
    
    CGContextAddPath(currentRef, path);
    [[UIColor orangeColor]setFill];
    
    CGContextDrawPath(currentRef, kCGPathFill);
    CGPathRelease(path);
}
屏幕快照 2016-01-19 上午10.28.49.png
-(void)drawAtTop{
    CGContextRef currentRef = UIGraphicsGetCurrentContext();
    CGContextSetShadowWithColor(currentRef, CGSizeMake(10, 10), 20.f, [UIColor redColor].CGColor);
    
    CGMutablePathRef path = CGPathCreateMutable();
    CGPathAddRect(path, NULL, CGRectMake(55, 60, 150, 150));
    
    CGContextAddPath(currentRef, path);
    [[UIColor orangeColor]setFill];
    
    CGContextDrawPath(currentRef, kCGPathFill);
    CGPathRelease(path);
}

-(void)drawAtBottom{
    //不特意加陰影也會出現(xiàn)陰影效果
    CGContextRef current = UIGraphicsGetCurrentContext();
    
    CGMutablePathRef path = CGPathCreateMutable();
    CGPathAddRect(path, NULL, CGRectMake(150, 250, 100, 100));
    
    CGContextAddPath(current, path);
    [[UIColor purpleColor]setFill];
    
    CGContextDrawPath(current, kCGPathFill);
    
    CGPathRelease(path);
    
    
}

由于上述 原因 所以我們可以使用CGContextSaveGState來保存圖形上下文狀態(tài),可以通過CGContextRestoreGState來恢復到以前的狀態(tài)黍氮。

屏幕快照 2016-01-19 上午10.33.23.png
-(void)drawAtTop{
    CGContextRef currentRef = UIGraphicsGetCurrentContext();
    //保存狀態(tài)
    CGContextSaveGState(currentRef);
    
    CGContextSetShadowWithColor(currentRef, CGSizeMake(10, 10), 20.f, [UIColor redColor].CGColor);
    
    CGMutablePathRef path = CGPathCreateMutable();
    CGPathAddRect(path, NULL, CGRectMake(55, 60, 150, 150));
    
    CGContextAddPath(currentRef, path);
    [[UIColor orangeColor]setFill];
    
    CGContextDrawPath(currentRef, kCGPathFill);
    CGPathRelease(path);
    //恢復到以前的狀態(tài)
    CGContextRestoreGState(currentRef);
}

-(void)drawAtBottom{
    //由于上述方法已經添加保存和修復狀態(tài)所以這個就沒有陰影效果
    CGContextRef current = UIGraphicsGetCurrentContext();
    
    CGMutablePathRef path = CGPathCreateMutable();
    CGPathAddRect(path, NULL, CGRectMake(150, 250, 100, 100));
    
    CGContextAddPath(current, path);
    [[UIColor purpleColor]setFill];
    
    CGContextDrawPath(current, kCGPathFill);
    
    CGPathRelease(path);
    
    
}

創(chuàng)建和漸變

屏幕快照 2016-01-19 上午10.55.54.png
-(void)drawRect:(CGRect)rect{
    CGContextRef currentRef = UIGraphicsGetCurrentContext();
    
    CGContextSaveGState(currentRef);
    
    //色彩空間對象
    CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();
    
    UIColor *startColor = [UIColor orangeColor];
    UIColor *endColor = [UIColor purpleColor];
    
    //CGColorGetComponents 返回一個包含各元素的數組
    CGFloat *startColorComponents = (CGFloat *)CGColorGetComponents(startColor.CGColor);
    CGFloat *endColorComponents = (CGFloat *)CGColorGetComponents(endColor.CGColor);
    
    //元素數組
    CGFloat colorComponents[8] = {
                startColorComponents[0],
                startColorComponents[1],
                startColorComponents[2],
                startColorComponents[3],
                endColorComponents[0],
                endColorComponents[1],
                endColorComponents[2],
                endColorComponents[3]
    };
    
    CGFloat colorIndices[2] = {0.0f,1.0f};
    
    //返回CGGradientRef 一個對象  gradient(梯度)
    CGGradientRef gradient = CGGradientCreateWithColorComponents(colorSpace,(const CGFloat *)&colorComponents, (const CGFloat *)&colorIndices, 2);
    
    //改變漸變的圖形只需要改變開始和結束的坐標點
    CGPoint startPoint = CGPointMake(0, [[UIScreen mainScreen] bounds].size.height/2);
    CGPoint endPoint = CGPointMake([[UIScreen mainScreen] bounds].size.width,startPoint.y);
    
    //畫線 一個context 梯度 開始結束坐標着裹,
    CGContextDrawLinearGradient(currentRef, gradient, startPoint, endPoint, kCGGradientDrawsBeforeStartLocation|kCGGradientDrawsAfterEndLocation);
    
    
    //釋放漸變對象
    CGGradientRelease(gradient);
    
    CGContextRestoreGState(currentRef);
    
}

平移圖形

屏幕快照 2016-01-19 上午11.33.03.png
-(void)drawRect:(CGRect)rect{
    
    CGMutablePathRef path = CGPathCreateMutable();
    
    CGRect rectAngle = CGRectMake(10, 10, 200, 200);
    
    CGAffineTransform transform = CGAffineTransformMakeTranslation(100, 0);
    //主要是傳入一個transform  從10 10 到100 0
    CGPathAddRect(path, &transform, rectAngle);

    
    CGContextRef currentRef = UIGraphicsGetCurrentContext();
    
    CGContextAddPath(currentRef, path);
    
    [[UIColor orangeColor]setFill];
    
    [[UIColor purpleColor]setStroke];
    
    CGContextSetLineWidth(currentRef, 5);
    
    CGContextDrawPath(currentRef, kCGPathFillStroke);
    
    CGPathRelease(path);
    
}

CGContextTranslateCTM 利用這個方法一樣可以達到上次的效果

-(void)drawRect:(CGRect)rect{
    
    CGMutablePathRef path = CGPathCreateMutable();
    
    CGRect rectAngle = CGRectMake(10, 10, 200, 200);
    
    CGPathAddRect(path, NULL, rectAngle);

    
    CGContextRef currentRef = UIGraphicsGetCurrentContext();

    //CGContextTranslateCTM  利用這個方法一樣可以達到上次的效果
    CGContextTranslateCTM(currentRef, 100, 0);

    CGContextAddPath(currentRef, path);
    
    [[UIColor orangeColor]setFill];
    
    [[UIColor purpleColor]setStroke];
    
    CGContextSetLineWidth(currentRef, 5);
    
    CGContextDrawPath(currentRef, kCGPathFillStroke);
    
    CGPathRelease(path);
    
}

縮放 由200 到100

屏幕快照 2016-01-19 上午11.40.26.png
-(void)drawRect:(CGRect)rect{
    
    CGMutablePathRef path = CGPathCreateMutable();
    
    CGRect rectAngle = CGRectMake(100, 100, 200, 200);
    
    //縮放
    CGAffineTransform transform = CGAffineTransformMakeScale(0.5, 0.5);
    
    CGPathAddRect(path, &transform, rectAngle);

    
    CGContextRef currentRef = UIGraphicsGetCurrentContext();

//    //CGContextTranslateCTM  利用這個方法一樣可以達到上次的效果
//    CGContextTranslateCTM(currentRef, 100, 0);

    CGContextAddPath(currentRef, path);
    
    [[UIColor orangeColor]setFill];
    
    [[UIColor purpleColor]setStroke];
    
    CGContextSetLineWidth(currentRef, 5);
    
    CGContextDrawPath(currentRef, kCGPathFillStroke);
    
    CGPathRelease(path);
    
}
-(void)drawRect:(CGRect)rect{
    
    CGMutablePathRef path = CGPathCreateMutable();
    
    CGRect rectAngle = CGRectMake(100, 100, 200, 200);
    
    //縮放
    CGAffineTransform transform = CGAffineTransformMakeScale(0.5, 0.5);
    
    CGPathAddRect(path, &transform, rectAngle);

    
    CGContextRef currentRef = UIGraphicsGetCurrentContext();

//    //CGContextTranslateCTM  利用這個方法一樣可以達到上次的效果
//    CGContextTranslateCTM(currentRef, 100, 0);

    CGContextAddPath(currentRef, path);
    
    [[UIColor orangeColor]setFill];
    
    [[UIColor purpleColor]setStroke];
    
    CGContextSetLineWidth(currentRef, 5);
    
    CGContextDrawPath(currentRef, kCGPathFillStroke);
    
    CGPathRelease(path);
    
}

旋轉

![Uploading 屏幕快照 2016-01-19 上午11.47.36_529253.png . . .]

-(void)drawRect:(CGRect)rect{
    
    CGMutablePathRef path = CGPathCreateMutable();
    
    CGRect rectAngle = CGRectMake(100, 100, 200, 200);

    CGAffineTransform transform = CGAffineTransformMakeRotation((45*M_PI)/180.0f);
    
    
    CGPathAddRect(path, &transform, rectAngle);
    
    CGContextRef currentRef = UIGraphicsGetCurrentContext();

    //CGContextTranslateCTM  利用這個方法一樣可以達到上次的效果
    CGContextScaleCTM(currentRef, 0.5, 0.5);

    CGContextAddPath(currentRef, path);
    
    [[UIColor orangeColor]setFill];
    
    [[UIColor purpleColor]setStroke];
    
    CGContextSetLineWidth(currentRef, 5);
    
    CGContextDrawPath(currentRef, kCGPathFillStroke);
    
    CGPathRelease(path);
    
}

一樣可以實現(xiàn)

    CGContextRotateCTM(currentRef, 30*M_PI / 180.f);

動畫和移動視圖

UIKit_Animation.gif
    [UIView beginAnimations:@"ImageViewAnimation" context:(__bridge void * _Nullable)(_imageView)];
    
    [UIView setAnimationDuration:5];
    [UIView setAnimationDelegate:self];
    
    [UIView setAnimationDidStopSelector:@selector(imageViewStop:finished:context:)];
    _imageView.frame = CGRectMake([[UIScreen mainScreen] bounds].size.width -100, [[UIScreen mainScreen] bounds].size.height - 100, 100, 100);
    
    [UIView commitAnimations];
-(void)imageViewStop:(NSString *)paramAnimationID finished:(NSNumber *)paramFinished context:(void *)paramContext{
    NSLog(@"animation finished");
    
    NSLog(@"animations__ID___%@",paramAnimationID);
    
    UIImageView *contextImageView = (__bridge UIImageView *)paramContext;
    NSLog(@"imageView————%@",contextImageView);
    
}
輸出
**2016-01-19 16:17:58.881 LoginTest[5362:1296744] animation finished**
**2016-01-19 16:17:58.881 LoginTest[5362:1296744] animations__ID___ImageViewAnimation**
**2016-01-19 16:17:58.882 LoginTest[5362:1296744] imageView————<UIImageView: 0x7fa2134a82c0; frame = (314 636; 100 100); opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0x7fa21371b000>>**

縮放

UIKit_Animation_Scale.gif
    _imageView.center = self.view.center;
    
    _imageView.transform = CGAffineTransformIdentity;
    
    [UIView beginAnimations:NULL context:NULL];
    [UIView setAnimationDuration:5];
    _imageView.transform = CGAffineTransformMakeScale(0.5, 0.5);
    [UIView commitAnimations];

旋轉

UIKit_Animation_Rotation.gif
   _imageView.center = self.view.center;
    
    _imageView.transform = CGAffineTransformIdentity;
    
    [UIView beginAnimations:NULL context:NULL];
    [UIView setAnimationDuration:2];
    _imageView.transform = CGAffineTransformMakeRotation((45*M_PI)/180);
    [UIView commitAnimations];
最后編輯于
?著作權歸作者所有,轉載或內容合作請聯(lián)系作者
  • 序言:七十年代末羽氮,一起剝皮案震驚了整個濱河市矿筝,隨后出現(xiàn)的幾起案子吆视,更是在濱河造成了極大的恐慌,老刑警劉巖吊宋,帶你破解...
    沈念sama閱讀 211,561評論 6 492
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件诬留,死亡現(xiàn)場離奇詭異,居然都是意外死亡,警方通過查閱死者的電腦和手機文兑,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 90,218評論 3 385
  • 文/潘曉璐 我一進店門,熙熙樓的掌柜王于貴愁眉苦臉地迎上來腺劣,“玉大人绿贞,你說我怎么就攤上這事¢僭” “怎么了籍铁?”我有些...
    開封第一講書人閱讀 157,162評論 0 348
  • 文/不壞的土叔 我叫張陵,是天一觀的道長趾断。 經常有香客問我拒名,道長,這世上最難降的妖魔是什么芋酌? 我笑而不...
    開封第一講書人閱讀 56,470評論 1 283
  • 正文 為了忘掉前任增显,我火速辦了婚禮,結果婚禮上脐帝,老公的妹妹穿的比我還像新娘同云。我一直安慰自己,他們只是感情好堵腹,可當我...
    茶點故事閱讀 65,550評論 6 385
  • 文/花漫 我一把揭開白布炸站。 她就那樣靜靜地躺著,像睡著了一般疚顷。 火紅的嫁衣襯著肌膚如雪旱易。 梳的紋絲不亂的頭發(fā)上,一...
    開封第一講書人閱讀 49,806評論 1 290
  • 那天腿堤,我揣著相機與錄音阀坏,去河邊找鬼。 笑死释液,一個胖子當著我的面吹牛全释,可吹牛的內容都是我干的。 我是一名探鬼主播误债,決...
    沈念sama閱讀 38,951評論 3 407
  • 文/蒼蘭香墨 我猛地睜開眼浸船,長吁一口氣:“原來是場噩夢啊……” “哼!你這毒婦竟也來了寝蹈?” 一聲冷哼從身側響起李命,我...
    開封第一講書人閱讀 37,712評論 0 266
  • 序言:老撾萬榮一對情侶失蹤搀庶,失蹤者是張志新(化名)和其女友劉穎谬哀,沒想到半個月后,有當地人在樹林里發(fā)現(xiàn)了一具尸體者疤,經...
    沈念sama閱讀 44,166評論 1 303
  • 正文 獨居荒郊野嶺守林人離奇死亡,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內容為張勛視角 年9月15日...
    茶點故事閱讀 36,510評論 2 327
  • 正文 我和宋清朗相戀三年阔籽,在試婚紗的時候發(fā)現(xiàn)自己被綠了流妻。 大學時的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片。...
    茶點故事閱讀 38,643評論 1 340
  • 序言:一個原本活蹦亂跳的男人離奇死亡笆制,死狀恐怖绅这,靈堂內的尸體忽然破棺而出,到底是詐尸還是另有隱情在辆,我是刑警寧澤证薇,帶...
    沈念sama閱讀 34,306評論 4 330
  • 正文 年R本政府宣布,位于F島的核電站匆篓,受9級特大地震影響浑度,放射性物質發(fā)生泄漏。R本人自食惡果不足惜鸦概,卻給世界環(huán)境...
    茶點故事閱讀 39,930評論 3 313
  • 文/蒙蒙 一箩张、第九天 我趴在偏房一處隱蔽的房頂上張望。 院中可真熱鬧完残,春花似錦伏钠、人聲如沸。這莊子的主人今日做“春日...
    開封第一講書人閱讀 30,745評論 0 21
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽。三九已至扎拣,卻和暖如春赴肚,著一層夾襖步出監(jiān)牢的瞬間,已是汗流浹背二蓝。 一陣腳步聲響...
    開封第一講書人閱讀 31,983評論 1 266
  • 我被黑心中介騙來泰國打工誉券, 沒想到剛下飛機就差點兒被人妖公主榨干…… 1. 我叫王不留,地道東北人刊愚。 一個月前我還...
    沈念sama閱讀 46,351評論 2 360
  • 正文 我出身青樓踊跟,卻偏偏與公主長得像,于是被迫代替她去往敵國和親鸥诽。 傳聞我的和親對象是個殘疾皇子商玫,可洞房花燭夜當晚...
    茶點故事閱讀 43,509評論 2 348

推薦閱讀更多精彩內容

  • UIBezierPath Class Reference 譯:UIBezierPath類封裝了Core Graph...
    鋼鉄俠閱讀 1,711評論 0 3
  • UIBezierPath詳解 我在寫本篇文章之前,也沒有系統(tǒng)學習過貝塞爾曲線牡借,只是曾經某一次的需求需要使用到拳昌,才臨...
    白水灬煮一切閱讀 1,165評論 0 4
  • 18- UIBezierPath官方API中文翻譯(待校對) ----------------- 華麗的分割線 -...
    醉臥欄桿聽雨聲閱讀 1,052評論 1 1
  • 下午和好朋友M聊天的時候,她說起一個非常有意思的故事钠龙。 那天M和男友一起去逛街的時候(男友趁假期特意跑來看她)炬藤,在...
    曾琦閱讀 687評論 0 0
  • 展示loading 1.在controller里請求數據在請求數據方法的開始處創(chuàng)建hud對象御铃,在解析完數據的地方讓...
    LGirl閱讀 950評論 0 0