重複の可能性:
グループ化されたUITableViewの背景を変更する
UITableViewの背景色が変更されている場合、変更できませんUITableViewStyleGrouped
。私のコード:
[addressNewTbl setBackgroundColor:[UIColor redColor]];
ヘルプ!
重複の可能性:
グループ化されたUITableViewの背景を変更する
UITableViewの背景色が変更されている場合、変更できませんUITableViewStyleGrouped
。私のコード:
[addressNewTbl setBackgroundColor:[UIColor redColor]];
ヘルプ!
コードを追加する必要があるかもしれません。試す -
[UITableView setBackgroundView: nil];
またはあなたもすることができます:
UIView* bview = [[UIView alloc] init];
bview.backgroundColor = [UIColor yellowColor];
[tableView setBackgroundView:bview];
両方とも動作します。
試しましたか
addressNewTbl.backgroundView = nil;
[addressNewTbl setBackgroundColor:[UIColor redColor]];
さらに、背景ビューを無効にする必要があります。
[addressNewTbl setBackgroundView:nil];
全体の背景色を設定する代わりに、の背景色を設定するUITableView
とどうなるか試してみてくださいbackgroundView
。
cellForRowAtIndexPathデータソースのmethod.try設定で
[cell setBackgroundColor:[UIcolor redColor]];