Ios icarousel图像的大小是多少
我想用icarousel显示一个图像,但是我不知道图像的大小,这样它就不会显示被挤压的图像或者类似的东西。我想把它裁剪一下,这样它会非常合身。有人知道图像的大小吗 您可以在此处设置视图大小Ios icarousel图像的大小是多少,ios,image,icarousel,Ios,Image,Icarousel,我想用icarousel显示一个图像,但是我不知道图像的大小,这样它就不会显示被挤压的图像或者类似的东西。我想把它裁剪一下,这样它会非常合身。有人知道图像的大小吗 您可以在此处设置视图大小 - (UIView *)carousel:(iCarousel *)carousel viewForItemAtIndex:(NSUInteger)index { UIImage *image = [UIImage imageNamed:[NSString stringWithFormat:
- (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;
}
您可以根据需要更改图像的大小。