Search code examples
iosimageicarousel

What is the icarousel image size


I want to display an image using icarousel however I don't know the image size so that it won't show it squeezed up or something like that. I want to crop it so that it will fit perfectly. Does anyone know the image size?


Solution

  • you can set view size here,

    - (UIView *)carousel:(iCarousel *)carousel viewForItemAtIndex:(NSUInteger)index
    {
             UIImage *image = [UIImage imageNamed:[NSString stringWithFormat:@"%@",[menuViews objectAtIndex:index]]];
            UIView* _reflectionView =[[[UIView alloc] initWithFrame:CGRectMake(0.0f, 0.0f, image.size.width, image.size.height)] autorelease];
            UIImageView *imgview = [[[UIImageView alloc] initWithFrame:CGRectMake(0, 0, image.size.width, image.size.height)] autorelease];
            imgview.image = image;
            [_reflectionView addSubview:imgview];
            return _reflectionView;
    }