【发布时间】:2012-03-23 12:35:23
【问题描述】:
我在我的应用程序中为 CoverFlow 实施 iCarousel。我找不到检测方法,现在显示的是哪个视图。
有人知道吗?谢谢。
【问题讨论】:
标签: ios xcode coverflow icarousel
我在我的应用程序中为 CoverFlow 实施 iCarousel。我找不到检测方法,现在显示的是哪个视图。
有人知道吗?谢谢。
【问题讨论】:
标签: ios xcode coverflow icarousel
根据documentation,可以使用属性currentItemIndex:
@property (nonatomic, readonly) NSInteger currentItemIndex;
轮播中当前居中项目的索引(只读)。
或属性currentItemView:
@property (nonatomic, retain, readonly) UIView *currentItemView;
轮播中当前居中的项目视图。此视图的索引与 currentItemIndex 匹配。
例如:
// Current index
NSInteger currentIndex = myCarousel.currentItemIndex;
// Current view
UIView *currentView = myCarousel.currentItemView;
【讨论】: