UITableViewCell の背景を画像にする場合、UITableViewCell の backgroundView プロパティに UIImageView をセットします。しかし、これだけでは問題が発生してしまうことがあります。 今回は、その問題を乗り越えて、UITableViewCell の背景を画像にする方法を紹介します。 以下のコードは、UITableView の dataSource オブジェクトが UITableViewCell を返すところです。UITableViewCell の背景を画像にしたいので、backgroundView プロパティに UIImageView をセットしています。 - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)
![UITableViewCell の背景を画像にする](https://cdn-ak-scissors.b.st-hatena.com/image/square/913ea40fda01f077a8f257a30a1095c04202ac2e/height=288;version=1;width=512/https%3A%2F%2Frunlooprun.files.wordpress.com%2F2010%2F12%2Fcellswithcustombg.png)