【发布时间】:2015-07-28 15:13:01
【问题描述】:
我想像这个链接一样创建 UIView 动画
我已经在 ViewDidLoad() 中尝试了所有这些代码,但没有工作
UIView *view = [[UIView alloc] initWithFrame:CGRectMake(200, 200, 100, 100)];
view.backgroundColor = [UIColor blueColor];
CATransition *animation=[CATransition animation];
[animation setDelegate:self];
[animation setDuration:1.75];
[animation setTimingFunction:UIViewAnimationCurveEaseInOut];
[animation setType:@"rippleEffect"];
[animation setFillMode:kCAFillModeRemoved];
animation.endProgress=1;
[animation setRemovedOnCompletion:NO];
[view.layer addAnimation:animation forKey:nil];
[self.view addSubview:view];
我想在 iOS 中创建相同的东西。请帮助我
【问题讨论】:
-
尝试运行这是'viewDidAppear'。它可能在视图变得可见之前完成动画。
-
在视图中不工作也出现了
-
看不到那个链接,你能解释一下你到底想要什么吗?
-
你能打开这个链接,这样你就可以看到一个涟漪圈效果..就像 tinder 应用程序中的主屏幕
标签: ios objective-c swift animation uiview