【问题标题】:OpenSource iCarousel in my app我的应用程序中的开源 iCarousel
【发布时间】:2012-03-23 12:35:23
【问题描述】:

我在我的应用程序中为 CoverFlow 实施 iCarousel。我找不到检测方法,现在显示的是哪个视图。

有人知道吗?谢谢。

【问题讨论】:

    标签: ios xcode coverflow icarousel


    【解决方案1】:

    根据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;
    

    【讨论】:

    • 是的,但是哪种方法?我应该在哪里得到它?
    • 我在 carouselDidScroll thnx 中做到了
    • 您仍应将上述答案标记为已接受的解决方案,因为它确实回答了您的问题。即使你问错了问题;)
    猜你喜欢
    • 2013-10-22
    • 2013-02-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-08-12
    相关资源
    最近更新 更多