LoginSignup
3
1

More than 5 years have passed since last update.

UITableViewのimageViewに画像を設定するときの注意点

Posted at

時間差で異なる大きさの画像を設定すると表示がおかしくなる

例えば、UITableViewの同じセルのimageViewに2種類の大きさの画像(ローディング画像80x80,アイコン画像250x250)を時間差で設定すると、最終的に250の画像を表示していても、最初から250で表示されている場合より小さく表示される。

この現象は、スクロールなどでUITableViewCellが再利用された際にも残る。

最終的にローディング画像をコードでリサイズして大きさをアイコン画像と揃えることで対処した。

3
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
1