如何在特定的项目或索引中滚动,例如:我在另一个UIView上设置了一个NSInteger,然后将其传递给我的iCarousel。在我的另一个UIView中,我将NSInteger设置如下:
[[NSUserDefaults standardUserDefaults] setInteger:button.tag
forKey:@"integer"];
[[NSUserDefaults standardUserDefaults] synchronize];在滚动时,我使用以下命令:
[carousel scrollByNumberOfItems:-35 duration:10.7550f];如何将整数传递到圆盘传送带,使其滚动,然后停止到特定的项目或索引。
发布于 2012-06-06 09:43:36
- (void)scrollToItemAtIndex:(NSInteger)index animated:(BOOL)animated;`在README中清楚地陈述和描述。方法下的第一个方法
或者,如果您喜欢:
- (void)scrollToItemAtIndex:(NSInteger)index
duration:(NSTimeInterval)scrollDuration;`发布于 2015-02-02 23:04:11
在Viewcontroller中的ViewDidLoad method中....
- (void)viewDidLoad
{
[super viewDidLoad];
//configure carousel
carousel.type=iCarouselTypeCylinder;
carousel.autoscroll=0.4;
}https://stackoverflow.com/questions/10907195
复制相似问题