2013-10-09 8 views
5

私はuitableviewの背景としてビューを設定しています。ビューにはcolorWithPatternImageがあります。tableView iOS7でbackgroundViewが動作しない

iOS6では正常に動作していますが、iOS7では効果がありません.iOS7ではTableViewの背景が白く残っています。私はThree20ライブラリを使用しています。

私のコードはiOS7で問題になる可能性がどのような

UIImage *imgBackGround = [UIImage imageNamed: @"my_background.png"]; 
self.tableView.backgroundColor = [UIColor clearColor]; 

UIView *backView = [[UIView alloc] initWithFrame:self.view.frame]; 
[backView setBackgroundColor:[UIColor colorWithPatternImage:imgBackGround]]; 
self.tableView.backgroundView = backView; 
[backView release]; 
self.view.backgroundColor=[UIColor colorWithPatternImage:imgBackGround]; 

のですか? お願いします。ありがとうございます。

+0

うわー、あなたはまだThree20ライブラリを使用していますか? –

答えて

5

iOS 7では、tableviewのセルは自動的に背景色が白色です。セルの色と背景をクリアする必要があります。これは確かにそれを解決しますcellForRowAtIndexPath

cell.backgroundColor = [UIColor clearColor]; 
cell.backgroundView = [UIView new]; 

使用。

+0

これは私の問題を解決しました。 ありがとうございます。 – sourabhkumbhar

関連する問題