欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

實(shí)例講解iOS應(yīng)用UI開(kāi)發(fā)之基礎(chǔ)動(dòng)畫的創(chuàng)建

 更新時(shí)間:2015年11月17日 09:39:21   作者:文頂頂  
這篇文章主要介紹了iOS應(yīng)用UI開(kāi)發(fā)之基礎(chǔ)動(dòng)畫的創(chuàng)建,以關(guān)鍵幀動(dòng)畫作為重要知識(shí)點(diǎn)進(jìn)行講解,需要的朋友可以參考下

一、簡(jiǎn)單介紹

CAPropertyAnimation的子類

屬性解析:

fromValue:keyPath相應(yīng)屬性的初始值

toValue:keyPath相應(yīng)屬性的結(jié)束值

隨著動(dòng)畫的進(jìn)行,在長(zhǎng)度為duration的持續(xù)時(shí)間內(nèi),keyPath相應(yīng)屬性的值從fromValue漸漸地變?yōu)閠oValue

如果fillMode=kCAFillModeForwards和removedOnComletion=NO,那么在動(dòng)畫執(zhí)行完畢后,圖層會(huì)保持顯示動(dòng)畫執(zhí)行后的狀態(tài)。但在實(shí)質(zhì)上,圖層的屬性值還是動(dòng)畫執(zhí)行前的初始值,并沒(méi)有真正被改變。

比如,CALayer的position初始值為(0,0),CABasicAnimation的fromValue為(10,10),toValue為(100,100),雖然動(dòng)畫執(zhí)行完畢后圖層保持在(100,100)這個(gè)位置,實(shí)質(zhì)上圖層的position還是為(0,0)

 

二、平移動(dòng)畫

代碼示例:

復(fù)制代碼 代碼如下:

//
//  YYViewController.m
//  07-核心動(dòng)畫(基礎(chǔ)動(dòng)畫)
//
//  Created by apple on 14-6-21.
//  Copyright (c) 2014年 itcase. All rights reserved.
//

#import "YYViewController.h"

@interface YYViewController ()
@property(nonatomic,strong)CALayer *myLayer;
@end


復(fù)制代碼 代碼如下:

@implementation YYViewController

- (void)viewDidLoad
{
    [super viewDidLoad];
   
    //創(chuàng)建layer
    CALayer *myLayer=[CALayer layer];
    //設(shè)置layer的屬性
    myLayer.bounds=CGRectMake(0, 0, 50, 80);
    myLayer.backgroundColor=[UIColor yellowColor].CGColor;
    myLayer.position=CGPointMake(50, 50);
    myLayer.anchorPoint=CGPointMake(0, 0);
    myLayer.cornerRadius=20;
    //添加layer
    [self.view.layer addSublayer:myLayer];
    self.myLayer=myLayer;
}

//設(shè)置動(dòng)畫(基礎(chǔ)動(dòng)畫)
-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
    //1.創(chuàng)建核心動(dòng)畫
    //    CABasicAnimation *anima=[CABasicAnimation animationWithKeyPath:<#(NSString *)#>]
    CABasicAnimation *anima=[CABasicAnimation animation];
   
    //1.1告訴系統(tǒng)要執(zhí)行什么樣的動(dòng)畫
    anima.keyPath=@"position";
    //設(shè)置通過(guò)動(dòng)畫,將layer從哪兒移動(dòng)到哪兒
    anima.fromValue=[NSValue valueWithCGPoint:CGPointMake(0, 0)];
    anima.toValue=[NSValue valueWithCGPoint:CGPointMake(200, 300)];
   
    //1.2設(shè)置動(dòng)畫執(zhí)行完畢之后不刪除動(dòng)畫
    anima.removedOnCompletion=NO;
    //1.3設(shè)置保存動(dòng)畫的最新?tīng)顟B(tài)
    anima.fillMode=kCAFillModeForwards;

    //2.添加核心動(dòng)畫到layer
    [self.myLayer addAnimation:anima forKey:nil];

}
  @end


代碼說(shuō)明:

 第42行設(shè)置的keyPath是@"position",說(shuō)明要修改的是CALayer的position屬性,也就是會(huì)執(zhí)行平移動(dòng)畫

 第44,45行,這里的屬性接收的時(shí)id類型的參數(shù),因此并不能直接使用CGPoint這種結(jié)構(gòu)體類型,而是要先包裝成NSValue對(duì)象后再使用。

 默認(rèn)情況下,動(dòng)畫執(zhí)行完畢后,動(dòng)畫會(huì)自動(dòng)從CALayer上移除,CALayer又會(huì)回到原來(lái)的狀態(tài)。為了保持動(dòng)畫執(zhí)行后的狀態(tài),可以加入第48,50行代碼

byValue和toValue的區(qū)別,前者是在當(dāng)前的位置上增加多少,后者是到指定的位置。
 

執(zhí)行效果:

2015111793321414.png (348×532)

設(shè)置代理:設(shè)置動(dòng)畫的代理,可以監(jiān)聽(tīng)動(dòng)畫的執(zhí)行過(guò)程,這里設(shè)置控制器為代理。

代碼示例:

復(fù)制代碼 代碼如下:

#import "YYViewController.h"

@interface YYViewController ()
@property(nonatomic,strong)CALayer *myLayer;
@end

@implementation YYViewController

- (void)viewDidLoad
{
    [super viewDidLoad];
   
    //創(chuàng)建layer
    CALayer *myLayer=[CALayer layer];
    //設(shè)置layer的屬性
    myLayer.bounds=CGRectMake(0, 0, 50, 80);
    myLayer.backgroundColor=[UIColor yellowColor].CGColor;
    myLayer.position=CGPointMake(50, 50);
    myLayer.anchorPoint=CGPointMake(0, 0);
    myLayer.cornerRadius=20;
    //添加layer
    [self.view.layer addSublayer:myLayer];
    self.myLayer=myLayer;
}

//設(shè)置動(dòng)畫(基礎(chǔ)動(dòng)畫)
-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
    //1.創(chuàng)建核心動(dòng)畫
    //    CABasicAnimation *anima=[CABasicAnimation animationWithKeyPath:<#(NSString *)#>]
    CABasicAnimation *anima=[CABasicAnimation animation];
   
    //1.1告訴系統(tǒng)要執(zhí)行什么樣的動(dòng)畫
    anima.keyPath=@"position";
    //設(shè)置通過(guò)動(dòng)畫,將layer從哪兒移動(dòng)到哪兒
    anima.fromValue=[NSValue valueWithCGPoint:CGPointMake(0, 0)];
    anima.toValue=[NSValue valueWithCGPoint:CGPointMake(200, 300)];
   
    //1.2設(shè)置動(dòng)畫執(zhí)行完畢之后不刪除動(dòng)畫
    anima.removedOnCompletion=NO;
    //1.3設(shè)置保存動(dòng)畫的最新?tīng)顟B(tài)
    anima.fillMode=kCAFillModeForwards;
    anima.delegate=self;
    //打印
    NSString *str=NSStringFromCGPoint(self.myLayer.position);
    NSLog(@"執(zhí)行前:%@",str);
    
    //2.添加核心動(dòng)畫到layer
    [self.myLayer addAnimation:anima forKey:nil];

}

-(void)animationDidStart:(CAAnimation *)anim
{
    NSLog(@"開(kāi)始執(zhí)行動(dòng)畫");
}

-(void)animationDidStop:(CAAnimation *)anim finished:(BOOL)flag
{
    //動(dòng)畫執(zhí)行完畢,打印執(zhí)行完畢后的position值
    NSString *str=NSStringFromCGPoint(self.myLayer.position);
    NSLog(@"執(zhí)行后:%@",str);
}

@end


打印position的屬性值,驗(yàn)證圖層的屬性值還是動(dòng)畫執(zhí)行前的初始值{50,50},并沒(méi)有真正被改變?yōu)閧200,300}。

2015111793357095.png (877×105)

三、縮放動(dòng)畫

實(shí)現(xiàn)縮放動(dòng)畫的代碼示例:

復(fù)制代碼 代碼如下:

//
//  YYViewController.m
//  08-核心動(dòng)畫平移
//
//  Created by apple on 14-6-21.
//  Copyright (c) 2014年 itcase. All rights reserved.
//

#import "YYViewController.h"

@interface YYViewController ()
@property(nonatomic,strong)CALayer *myLayer;
@end


復(fù)制代碼 代碼如下:

@implementation YYViewController

- (void)viewDidLoad
{
    [super viewDidLoad];
   
    //創(chuàng)建layer
    CALayer *myLayer=[CALayer layer];
    //設(shè)置layer的屬性
    myLayer.bounds=CGRectMake(0, 0, 150, 60);
    myLayer.backgroundColor=[UIColor yellowColor].CGColor;
    myLayer.position=CGPointMake(50, 50);
    myLayer.anchorPoint=CGPointMake(0, 0);
    myLayer.cornerRadius=40;
    //添加layer
    [self.view.layer addSublayer:myLayer];
    self.myLayer=myLayer;
}

-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
    //1.創(chuàng)建動(dòng)畫
    CABasicAnimation *anima=[CABasicAnimation animationWithKeyPath:@"bounds"];
    //1.1設(shè)置動(dòng)畫執(zhí)行時(shí)間
    anima.duration=2.0;
    //1.2設(shè)置動(dòng)畫執(zhí)行完畢后不刪除動(dòng)畫
    anima.removedOnCompletion=NO;
    //1.3設(shè)置保存動(dòng)畫的最新?tīng)顟B(tài)
    anima.fillMode=kCAFillModeForwards;
    //1.4修改屬性,執(zhí)行動(dòng)畫
    anima.toValue=[NSValue valueWithCGRect:CGRectMake(0, 0, 200, 200)];
    //2.添加動(dòng)畫到layer
    [self.myLayer addAnimation:anima forKey:nil];
}

@end


實(shí)現(xiàn)效果:

2015111793435216.png (348×532)

四、旋轉(zhuǎn)動(dòng)畫

代碼示例:

復(fù)制代碼 代碼如下:

//
//  YYViewController.m
//  09-核心動(dòng)畫旋轉(zhuǎn)
//
//  Created by apple on 14-6-21.
//  Copyright (c) 2014年 itcase. All rights reserved.
//

#import "YYViewController.h"

@interface YYViewController ()
@property(nonatomic,strong)CALayer *myLayer;
@end


復(fù)制代碼 代碼如下:

@implementation YYViewController
- (void)viewDidLoad
{
    [super viewDidLoad];
   
    //創(chuàng)建layer
    CALayer *myLayer=[CALayer layer];
    //設(shè)置layer的屬性
    myLayer.bounds=CGRectMake(0, 0, 150, 60);
    myLayer.backgroundColor=[UIColor yellowColor].CGColor;
    myLayer.position=CGPointMake(50, 50);
    myLayer.anchorPoint=CGPointMake(0, 0);
    myLayer.cornerRadius=40;
    //添加layer
    [self.view.layer addSublayer:myLayer];
    self.myLayer=myLayer;
}

-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
    //1.創(chuàng)建動(dòng)畫
    CABasicAnimation *anima=[CABasicAnimation animationWithKeyPath:@"transform"];
    //1.1設(shè)置動(dòng)畫執(zhí)行時(shí)間
    anima.duration=2.0;
    //1.2修改屬性,執(zhí)行動(dòng)畫
    anima.toValue=[NSValue valueWithCATransform3D:CATransform3DMakeRotation(M_PI_2+M_PI_4, 1, 1, 0)];
    //1.3設(shè)置動(dòng)畫執(zhí)行完畢后不刪除動(dòng)畫
    anima.removedOnCompletion=NO;
    //1.4設(shè)置保存動(dòng)畫的最新?tīng)顟B(tài)
    anima.fillMode=kCAFillModeForwards;
   
    //2.添加動(dòng)畫到layer
    [self.myLayer addAnimation:anima forKey:nil];
}
@end


實(shí)現(xiàn)效果:

2015111793457814.png (348×532)

補(bǔ)充:

可以通過(guò)transform(KVC)的方式來(lái)進(jìn)行設(shè)置。

代碼示例(平移):

復(fù)制代碼 代碼如下:

#import "YYViewController.h"

@interface YYViewController ()
@property(nonatomic,strong)CALayer *myLayer;
@end


復(fù)制代碼 代碼如下:

@implementation YYViewController
- (void)viewDidLoad
{
    [super viewDidLoad];
   
    //創(chuàng)建layer
    CALayer *myLayer=[CALayer layer];
    //設(shè)置layer的屬性
    myLayer.bounds=CGRectMake(0, 0, 150, 60);
    myLayer.backgroundColor=[UIColor yellowColor].CGColor;
    myLayer.position=CGPointMake(50, 50);
    myLayer.anchorPoint=CGPointMake(0, 0);
    myLayer.cornerRadius=40;
    //添加layer
    [self.view.layer addSublayer:myLayer];
    self.myLayer=myLayer;
}

-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
    //1.創(chuàng)建動(dòng)畫
    CABasicAnimation *anima=[CABasicAnimation animation];
    anima.keyPath=@"transform";
    //1.1設(shè)置動(dòng)畫執(zhí)行時(shí)間
    anima.duration=2.0;
    //1.2修改屬性,執(zhí)行動(dòng)畫
 
    anima.toValue=[NSValue valueWithCATransform3D:CATransform3DMakeTranslation(0, 100, 1)];
    //1.3設(shè)置動(dòng)畫執(zhí)行完畢后不刪除動(dòng)畫
    anima.removedOnCompletion=NO;
    //1.4設(shè)置保存動(dòng)畫的最新?tīng)顟B(tài)
    anima.fillMode=kCAFillModeForwards;
   
    //2.添加動(dòng)畫到layer
    [self.myLayer addAnimation:anima forKey:nil];
}


實(shí)現(xiàn)效果:

繪制的圖形在y的方向上移動(dòng)100個(gè)單位。

2015111793535791.png (348×532)

五、關(guān)鍵幀動(dòng)畫

1.簡(jiǎn)單介紹

是CApropertyAnimation的子類,跟CABasicAnimation的區(qū)別是:CABasicAnimation只能從一個(gè)數(shù)值(fromValue)變到另一個(gè)數(shù)值(toValue),而CAKeyframeAnimation會(huì)使用一個(gè)NSArray保存這些數(shù)值

屬性解析:

values:就是上述的NSArray對(duì)象。里面的元素稱為”關(guān)鍵幀”(keyframe)。動(dòng)畫對(duì)象會(huì)在指定的時(shí)間(duration)內(nèi),依次顯示values數(shù)組中的每一個(gè)關(guān)鍵幀

path:可以設(shè)置一個(gè)CGPathRef\CGMutablePathRef,讓層跟著路徑移動(dòng)。path只對(duì)CALayer的anchorPoint和position起作用。如果你設(shè)置了path,那么values將被忽略

keyTimes:可以為對(duì)應(yīng)的關(guān)鍵幀指定對(duì)應(yīng)的時(shí)間點(diǎn),其取值范圍為0到1.0,keyTimes中的每一個(gè)時(shí)間值都對(duì)應(yīng)values中的每一幀.當(dāng)keyTimes沒(méi)有設(shè)置的時(shí)候,各個(gè)關(guān)鍵幀的時(shí)間是平分的

說(shuō)明:CABasicAnimation可看做是最多只有2個(gè)關(guān)鍵幀的CAKeyframeAnimation

2.代碼示例

第一種方式:

代碼:

復(fù)制代碼 代碼如下:

//
//  YYViewController.m
//  10-核心動(dòng)畫(關(guān)鍵幀動(dòng)畫1)
//
//  Created by apple on 14-6-21.
//  Copyright (c) 2014年 itcase. All rights reserved.
//

#import "YYViewController.h"

@interface YYViewController ()
@property (weak, nonatomic) IBOutlet UIView *customView;

@end


復(fù)制代碼 代碼如下:

@implementation YYViewController


-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
    //1.創(chuàng)建核心動(dòng)畫
    CAKeyframeAnimation *keyAnima=[CAKeyframeAnimation animation];
    //平移
    keyAnima.keyPath=@"position";
    //1.1告訴系統(tǒng)要執(zhí)行什么動(dòng)畫
    NSValue *value1=[NSValue valueWithCGPoint:CGPointMake(100, 100)];
    NSValue *value2=[NSValue valueWithCGPoint:CGPointMake(200, 100)];
    NSValue *value3=[NSValue valueWithCGPoint:CGPointMake(200, 200)];
    NSValue *value4=[NSValue valueWithCGPoint:CGPointMake(100, 200)];
    NSValue *value5=[NSValue valueWithCGPoint:CGPointMake(100, 100)];
    keyAnima.values=@[value1,value2,value3,value4,value5];
    //1.2設(shè)置動(dòng)畫執(zhí)行完畢后,不刪除動(dòng)畫
    keyAnima.removedOnCompletion=NO;
    //1.3設(shè)置保存動(dòng)畫的最新?tīng)顟B(tài)
    keyAnima.fillMode=kCAFillModeForwards;
    //1.4設(shè)置動(dòng)畫執(zhí)行的時(shí)間
    keyAnima.duration=4.0;
    //1.5設(shè)置動(dòng)畫的節(jié)奏
    keyAnima.timingFunction=[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
   
    //設(shè)置代理,開(kāi)始—結(jié)束
    keyAnima.delegate=self;
    //2.添加核心動(dòng)畫
    [self.customView.layer addAnimation:keyAnima forKey:nil];
}

-(void)animationDidStart:(CAAnimation *)anim
{
    NSLog(@"開(kāi)始動(dòng)畫");
}

-(void)animationDidStop:(CAAnimation *)anim finished:(BOOL)flag
{
    NSLog(@"結(jié)束動(dòng)畫");
}
@end


說(shuō)明:這個(gè)項(xiàng)目在storyboard中拖入了一個(gè)view,并和控制器中的custom進(jìn)行了關(guān)聯(lián)。

效果和打印結(jié)果:

2015111793612382.png (996×372)

補(bǔ)充:設(shè)置動(dòng)畫的節(jié)奏

2015111793633341.png (591×323)

第二種方式(使用path)讓layer在指定的路徑上移動(dòng)(畫圓):

代碼:

復(fù)制代碼 代碼如下:

#import "YYViewController.h"

@interface YYViewController ()
@property (weak, nonatomic) IBOutlet UIView *customView;

@end


復(fù)制代碼 代碼如下:

@implementation YYViewController


-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
    //1.創(chuàng)建核心動(dòng)畫
    CAKeyframeAnimation *keyAnima=[CAKeyframeAnimation animation];
    //平移
    keyAnima.keyPath=@"position";
    //1.1告訴系統(tǒng)要執(zhí)行什么動(dòng)畫
    //創(chuàng)建一條路徑
    CGMutablePathRef path=CGPathCreateMutable();
    //設(shè)置一個(gè)圓的路徑
    CGPathAddEllipseInRect(path, NULL, CGRectMake(150, 100, 100, 100));
    keyAnima.path=path;
   
    //有create就一定要有release
    CGPathRelease(path);
    //1.2設(shè)置動(dòng)畫執(zhí)行完畢后,不刪除動(dòng)畫
    keyAnima.removedOnCompletion=NO;
    //1.3設(shè)置保存動(dòng)畫的最新?tīng)顟B(tài)
    keyAnima.fillMode=kCAFillModeForwards;
    //1.4設(shè)置動(dòng)畫執(zhí)行的時(shí)間
    keyAnima.duration=5.0;
    //1.5設(shè)置動(dòng)畫的節(jié)奏
    keyAnima.timingFunction=[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
   
    //設(shè)置代理,開(kāi)始—結(jié)束
    keyAnima.delegate=self;
    //2.添加核心動(dòng)畫
    [self.customView.layer addAnimation:keyAnima forKey:nil];
}

-(void)animationDidStart:(CAAnimation *)anim
{
    NSLog(@"開(kāi)始動(dòng)畫");
}

-(void)animationDidStop:(CAAnimation *)anim finished:(BOOL)flag
{
    NSLog(@"結(jié)束動(dòng)畫");
}
@end


說(shuō)明:可以通過(guò)path屬性,讓layer在指定的軌跡上運(yùn)動(dòng)。

停止動(dòng)畫:

復(fù)制代碼 代碼如下:

#import "YYViewController.h"

@interface YYViewController ()
@property (weak, nonatomic) IBOutlet UIView *customView;
- (IBAction)stopOnClick:(UIButton *)sender;

@end


復(fù)制代碼 代碼如下:

@implementation YYViewController


-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
    //1.創(chuàng)建核心動(dòng)畫
    CAKeyframeAnimation *keyAnima=[CAKeyframeAnimation animation];
    //平移
    keyAnima.keyPath=@"position";
    //1.1告訴系統(tǒng)要執(zhí)行什么動(dòng)畫
    //創(chuàng)建一條路徑
    CGMutablePathRef path=CGPathCreateMutable();
    //設(shè)置一個(gè)圓的路徑
    CGPathAddEllipseInRect(path, NULL, CGRectMake(150, 100, 100, 100));
    keyAnima.path=path;
   
    //有create就一定要有release
    CGPathRelease(path);
    //1.2設(shè)置動(dòng)畫執(zhí)行完畢后,不刪除動(dòng)畫
    keyAnima.removedOnCompletion=NO;
    //1.3設(shè)置保存動(dòng)畫的最新?tīng)顟B(tài)
    keyAnima.fillMode=kCAFillModeForwards;
    //1.4設(shè)置動(dòng)畫執(zhí)行的時(shí)間
    keyAnima.duration=5.0;
    //1.5設(shè)置動(dòng)畫的節(jié)奏
    keyAnima.timingFunction=[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
   
    //2.添加核心動(dòng)畫
    [self.customView.layer addAnimation:keyAnima forKey:@"wendingding"];
}

- (IBAction)stopOnClick:(UIButton *)sender {
    //停止self.customView.layer上名稱標(biāo)示為wendingding的動(dòng)畫
    [self.customView.layer removeAnimationForKey:@"wendingding"];
}
@end


2015111793655932.png (434×616)

點(diǎn)擊停止動(dòng)畫,程序內(nèi)部會(huì)調(diào)用  [self.customView.layer removeAnimationForKey:@"wendingding"];停止self.customView.layer上名稱標(biāo)示為wendingding的動(dòng)畫。

3.圖標(biāo)抖動(dòng)

代碼示例:

復(fù)制代碼 代碼如下:

//
//  YYViewController.m
//  12-圖標(biāo)抖動(dòng)
//
//  Created by apple on 14-6-21.
//  Copyright (c) 2014年 itcase. All rights reserved.
//

#import "YYViewController.h"
#define angle2Radian(angle)  ((angle)/180.0*M_PI)

@interface YYViewController ()
@property (weak, nonatomic) IBOutlet UIImageView *iconView;

@end


復(fù)制代碼 代碼如下:

@implementation YYViewController

-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
    //1.創(chuàng)建核心動(dòng)畫
    CAKeyframeAnimation *keyAnima=[CAKeyframeAnimation animation];
    keyAnima.keyPath=@"transform.rotation";
    //設(shè)置動(dòng)畫時(shí)間
    keyAnima.duration=0.1;
    //設(shè)置圖標(biāo)抖動(dòng)弧度
    //把度數(shù)轉(zhuǎn)換為弧度  度數(shù)/180*M_PI
    keyAnima.values=@[@(-angle2Radian(4)),@(angle2Radian(4)),@(-angle2Radian(4))];
    //設(shè)置動(dòng)畫的重復(fù)次數(shù)(設(shè)置為最大值)
    keyAnima.repeatCount=MAXFLOAT;
   
    keyAnima.fillMode=kCAFillModeForwards;
    keyAnima.removedOnCompletion=NO;
    //2.添加動(dòng)畫
    [self.iconView.layer addAnimation:keyAnima forKey:nil];
}

@end


說(shuō)明:圖標(biāo)向左向右偏轉(zhuǎn)一個(gè)弧度(4),產(chǎn)生抖動(dòng)的視覺(jué)效果。

程序界面:
2015111793717112.png (348×532) 

相關(guān)文章

  • iOS基礎(chǔ)知識(shí)之@property 和 Ivar 的區(qū)別

    iOS基礎(chǔ)知識(shí)之@property 和 Ivar 的區(qū)別

    這篇文章主要介紹了iOS基礎(chǔ)知識(shí)之@property 和 Ivar 的區(qū)別介紹,非常不錯(cuò),具有參考借鑒價(jià)值,需要的朋友可以參考下
    2016-08-08
  • iOS開(kāi)發(fā)之手動(dòng)布局子視圖

    iOS開(kāi)發(fā)之手動(dòng)布局子視圖

    這篇文章主要介紹了iOS開(kāi)發(fā)之手動(dòng)布局子視圖,從入門到精通幫助大家更好的開(kāi)發(fā)iOS項(xiàng)目,感興趣的小伙伴們可以參考一下
    2016-08-08
  • 開(kāi)發(fā)繪圖、手勢(shì)綜合App注意點(diǎn)

    開(kāi)發(fā)繪圖、手勢(shì)綜合App注意點(diǎn)

    本篇文章主要給大家詳細(xì)講述了在IOS開(kāi)發(fā)繪圖、手勢(shì)綜合App容易遇到的坑以及注意事項(xiàng)等內(nèi)容,有興趣的朋友參考下吧。
    2018-02-02
  • Objective-C與Swift之間的互相調(diào)用和跳轉(zhuǎn)

    Objective-C與Swift之間的互相調(diào)用和跳轉(zhuǎn)

    這篇文章主要給大家介紹了關(guān)于Objective-C與Swift之間的互相調(diào)用和跳轉(zhuǎn)的相關(guān)資料,文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)學(xué)習(xí)吧
    2018-05-05
  • react-native中AsyncStorage實(shí)例詳解

    react-native中AsyncStorage實(shí)例詳解

    這篇文章主要介紹了react-native中AsyncStorage實(shí)例詳解的相關(guān)資料,需要的朋友可以參考下
    2017-03-03
  • 在iOS開(kāi)發(fā)的Quartz2D使用中實(shí)現(xiàn)圖片剪切和截屏功能

    在iOS開(kāi)發(fā)的Quartz2D使用中實(shí)現(xiàn)圖片剪切和截屏功能

    這篇文章主要介紹了在iOS開(kāi)發(fā)的Quartz2D使用中實(shí)現(xiàn)圖片剪切和截屏功能的方法,代碼基于傳統(tǒng)的Objective-C,需要的朋友可以參考下
    2015-12-12
  • IOS 圖文混排(CoreText.framework)詳解及實(shí)例

    IOS 圖文混排(CoreText.framework)詳解及實(shí)例

    這篇文章主要介紹了IOS 圖文混排(CoreText.framework)詳解及實(shí)例的相關(guān)資料,這里對(duì)IOS 的圖文混排進(jìn)行了詳細(xì)介紹,并附代碼實(shí)例,和實(shí)現(xiàn)效果圖,需要的朋友可以參考下
    2016-11-11
  • IOS開(kāi)發(fā)之路--C語(yǔ)言指針

    IOS開(kāi)發(fā)之路--C語(yǔ)言指針

    指針是C語(yǔ)言的精髓,但是很多初學(xué)者往往對(duì)于指針的概念并不深刻,以至于學(xué)完之后隨著時(shí)間的推移越來(lái)越模糊,感覺(jué)指針難以掌握,本文通過(guò)簡(jiǎn)單的例子試圖將指針解釋清楚
    2014-08-08
  • iOS中監(jiān)聽(tīng)UITextField值改變事件的方法實(shí)例

    iOS中監(jiān)聽(tīng)UITextField值改變事件的方法實(shí)例

    UITextField 是一個(gè)用來(lái)處理文本輸入和現(xiàn)實(shí)的控件,在我們的開(kāi)發(fā)當(dāng)中也是經(jīng)常被用到。下面這篇文章主要給大家介紹了關(guān)于iOS中監(jiān)聽(tīng)UITextField值改變事件的相關(guān)資料,文中通過(guò)示例代碼介紹的非常詳細(xì),需要的朋友可以參考下
    2018-07-07
  • IOS開(kāi)發(fā)之適配iOS10及Xcode8的注意點(diǎn)

    IOS開(kāi)發(fā)之適配iOS10及Xcode8的注意點(diǎn)

    這篇文章主要介紹了IOS開(kāi)發(fā)之適配iOS10及Xcode8的注意點(diǎn),本文給大家介紹了可能出現(xiàn)的問(wèn)題及相應(yīng)的解決方法,非常不錯(cuò)具有參考借鑒價(jià)值,感興趣的朋友一起看看
    2016-10-10

最新評(píng)論