カスタム UITableViewHeaderFooterView を作成し、ペン先から UITableView に正常にロードしましたが、常にこのメッセージが表示されます
「UITableViewHeaderFooterView の背景色の設定は廃止されました。代わりに contentView.backgroundColor を使用してください。」
カスタム UITableViewHeaderFooterView をロードするコードは次のとおりです。
- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section {
KTHeaderFooterViewIphone customHeaderIphone* = [[[NSBundle mainBundle] loadNibNamed:@"KTHeaderFooterViewIphone" owner:self options:nil] objectAtIndex:0];
customHeaderIphone.tintColor = [UIColor whiteColor]; // this code worked, but the message above always show
customHeaderIphone.contentView.backgroundColor = [UIColor redColor]; // this code doesn't work, nothing's happened
customHeaderIphone.contentView.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"customHeader.png"]]; // this code doesn't work too, I can't change custom background image
return customHeaderIphone;
}