iosxcodecoverflowicarousel

OpenSource iCarousel in my app


I implementing iCarousel in my app for a CoverFlow. I can't find method for detect, which view is showed right now.

Any body know it? Thnx.


Solution

  • According to the documentation, you can use the property currentItemIndex:

    @property (nonatomic, readonly) NSInteger currentItemIndex;
    

    The index of the currently centered item in the carousel (read only).

    Or the property currentItemView:

    @property (nonatomic, retain, readonly) UIView *currentItemView;
    

    The currently centered item view in the carousel. The index of this view matches currentItemIndex.

    For example:

    // Current index
    NSInteger currentIndex = myCarousel.currentItemIndex;
    
    // Current view
    UIView *currentView = myCarousel.currentItemView;