我正在尋找一種方法來指示uiview上的一個pagecurl動畫,以提示用戶可以滾動瀏覽某些頁面的提示。它應該是某種部分的pagecurl。用swift部分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
我已經這樣做了。現在,我想在第一頁上提供類似傳情的內容,以向用戶顯示有更多網頁可供使用,並且可以滾動瀏覽。就像右下角稍微卷起一點。 – Patricks
我聽到你的聲音。我在我的項目中實現這一點的方式我使用帶捲曲圖像背景的UIButton,當用戶按下該按鈕時,它將觸發捲曲動畫。 – rohit90