【发布时间】:2012-04-24 09:40:59
【问题描述】:
我的代码在下面
- (UIView *)carousel:(iCarousel *)carousel viewForItemAtIndex:(NSUInteger)index reusingView:(UIView *)view
{
UIImageView *imgView = nil;
if (view == nil)
{
NSLog(@"no is %i",index);
view = [[[UIView alloc] initWithFrame:CGRectMake(0, 0, 255, 255)] autorelease];
imgView = [[[UIImageView alloc] initWithImage:[ImagesCFArray objectAtIndex:index]] autorelease];
[view addSubview:imgView];
}
else
{
}
return view;
}
ImagesCfArray 包含要显示的图像。当轮播移动或滚动时,第 0 个索引图像与其他图像重叠。请给我解决方案。
【问题讨论】:
-
你在哪里增加索引?