您的位置:首页 > 产品设计 > UI/UE

UIImageView加抖动效果(转)

2014-07-20 17:10 176 查看
CGAffineTransform moveRight = CGAffineTransformTranslate(CGAffineTransformIdentity, 20, 0);

CGAffineTransform moveLeft = CGAffineTransformTranslate(CGAffineTransformIdentity, -20, 0);

CGAffineTransform resetTransform = CGAffineTransformTranslate(CGAffineTransformIdentity, 0, 0);

[UIView animateWithDuration:0.1 animations:^{

self.transform = moveLeft;

} completion:^(BOOL finished) {

[UIView animateWithDuration:0.1 animations:^{

self.transform = moveRight;

} completion:^(BOOL finished) {

[UIView animateWithDuration:0.1 animations:^{

self.transform = moveLeft;

} completion:^(BOOL finished) {

[UIView animateWithDuration:0.1 animations:^{

self.transform = resetTransform;

}];

}];

}];

}];

rect1.origin.x -= 10;
[UIView animateWithDuration:0 delay:0 options:UIViewAnimationTransitionNone animations:^(void){

logInWindow.frame = rect1;
} completion:^(BOOL finshed){

[UIView animateWithDuration:0.01 delay:0 options:UIViewAnimationOptionAutoreverse | UIViewAnimationOptionRepeat animations:^(void){
[UIView setAnimationRepeatCount:20];
logInWindow.frame = firstRect;

} completion:^(BOOL finshed){

}]; }];
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐