我正在开发一个 iphone 应用程序。
我正在使用 iCarousel 类: https ://github.com/nicklockwood/iCarousel
我希望这样当有人点击其中一个轮播图像时,图像会翻转以显示图像背面的按钮,人们可以点击这些按钮。
我正在按照本教程来实现 icarousel 类:http: //mobile.tutsplus.com/tutorials/iphone/create-an-awesome-carousel-version-2-0/
如何添加方法来实现我上面描述的目标?
我做了以下事情:
- (void)carousel:(iCarousel *)carousel didSelectItemAtIndex:(NSInteger)index
{
CGRect frame = CGRectMake(round((self.view.bounds.size.width - 300) / 2.0), 0, 300, 300);
UIImageView *flipToView = [[UIImageView alloc] initWithFrame: frame];
flipToView.image = [UIImage imageNamed:@"cl2.png"];
UIView *containerView = self.aCarousel.currentItemView.superview;
[UIView transitionFromView: containerView toView: flipToView duration:2.0 options:UIViewAnimationOptionTransitionFlipFromLeft
completion:nil];
}
但是我如何为轮播中的每个图像提供不同的翻转图像?就像在轮播上单击的每个图像的翻转视图都是不同的。还有当人们向右滚动时如何隐藏翻转的图像?