任意の位置に画像をするコードは下記のとおり。
UIImage *image = [UIImage imageWithData:self.imageData];
UIImageView *photo = [[[UIImageView alloc] initWithFrame:CGRectMake(100.0, 10.0, 128.0, 128.0)] autorelease];
photo.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleHeight;
photo.image = image;
[cell.contentView addSubview:photo];
上記は、x軸を100.0、y軸を10.0、画像サイズを128x128とする例。
タグ:iPhone
【UIImageViewの最新記事】
2種類の画像を、無事に任意の位置に表示は出来たのですが
スクロールすると、画像が入れ変わってしまいまう場合があります。
回避する方法はありますでしょうか?
ご教授頂ければ幸いです。
よろしくお願いします。