に追加しようとしUIImage
ていUIView
ます。ビュー rect を定義したように、イメージはビューのサイズとまったく同じです。どういうわけか、画像がより広く、より高く表示されていることがわかります(引き伸ばされています)。ビューで画像サイズが変更されるのはなぜですか?
UIImage *strip=[UIImage imageNamed:@"albumStrip.png"];
UIImageView *imageView=[[UIImageView alloc]initWithImage:strip];
UIView * aView = [ [UIView alloc] initWithFrame:CGRectMake(0.03*winSize.width, 0.85*winSize.height , 0.95*winSize.width, winSize.width/10) ];
aView.backgroundColor = [UIColor whiteColor];
aView.tag = 31000;
aView.layer.cornerRadius=1;
[aView addSubview:imageView];
編集:私の画像が640x960であることがわかります。iPhone4の場合、UIImageがそれを取得して係数2で分割する方法を知らない可能性はありますか?