【发布时间】:2017-01-29 17:19:39
【问题描述】:
我正在寻找一种在 uiview 上指示 pagecurl 动画的方法,以向用户提示他可以滚动浏览某些页面。它应该是某种局部卷曲。
问题是我不知道该怎么做。我找到了一些教程,但仅针对目标 c,我不知道如何将其转换为 swift:
[UIView animateWithDuration:1.0
animations:^{
CATransition * animation = [CATransition animation];
[animation setDuration:1.2f];
animation.startProgress = 0.0;
animation.endProgress = 0.6;
[animation setTimingFunction:UIViewAnimationCurveEaseInOut];
[animation setType:@"pageCurl"];
[animation setSubtype:@"fromRight"];
[animation setRemovedOnCompletion:NO];
[animation setFillMode: @"extended"];
[animation setRemovedOnCompletion: NO];
[[self.animatedUIView layer] addAnimation:animation
forKey:@"pageFlipAnimation"];
[self.animatedUIView addSubview:tempUIView];
}
];
http://www.iostute.com/2015/04/how-to-implement-partial-and-full-page.html
【问题讨论】:
标签: ios swift xcode uiview page-curl