gpt4 book ai didi

ios - 在我的应用程序中开源 iCarousel

转载 作者:行者123 更新时间:2023-11-28 23:01:58 24 4
gpt4 key购买 nike

我在我的 CoverFlow 应用中实现了 iCarousel。我找不到检测方法,现在显示的是哪个 View 。

有人知道吗?谢谢。

最佳答案

根据documentation ,您可以使用属性 currentItemIndex:

@property (nonatomic, readonly) NSInteger currentItemIndex;

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

或者属性currentItemView:

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

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

例如:

// Current index
NSInteger currentIndex = myCarousel.currentItemIndex;

// Current view
UIView *currentView = myCarousel.currentItemView;

关于ios - 在我的应用程序中开源 iCarousel,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9839282/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com