icarousel を使って画像を表示したいのですが、画像のサイズがわからないので、画像が押しつぶされて表示されません。完全に収まるようにトリミングしたいと思います。画像サイズわかる方いますか?
1014 次
1 に答える
1
ここで表示サイズを設定できます
- (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;
}
于 2013-07-17T09:26:17.530 に答える