ios - 在iCarousel中,图像重叠。

标签 ios xcode4.3 icarousel

我的代码如下

- (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个索引图像会与其他图像重叠。请给我解决方案。

最佳答案

您可以显示itemWidth实现吗?返回值是否超过255?

关于ios - 在iCarousel中,图像重叠。,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10295377/

相关文章:

ios - icarousel viewForItemAtIndex没有被调用?

ios - iCarousel 线性类型从中心开始

iphone - 为什么约束不适用于 UIView 但适用于 UILabel?

ios - 在 SpriteKit 场景背景周围夹紧相机

xcode - 如何运行/安装xcodebuild?

uilabel - UILabel 和 UILabel 文本的不透明度不同

ios - 我可以在 UITextField 上设置插入点吗

iOS PDFKit 禁用垂直滚动反弹

objective-c - 从 nsarray 中取出对象

objective-c - 使用 Afnetworking 获取 UIImageView 并将其放入数组中