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?

有帮助吗?

解决方案

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;
}
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top