당신의 질문은 혼란 스럽다. UITableview의 배경으로 이미지를 추가하고 테이블을 스크롤해도 이미지가 영향을 미치지 않는다는 것을 이해합니다.
해결책 : 셀에 배경색을 명확하게 설정하고 이미지를 아래 언급 된 것처럼 Tableview의 배경으로 추가하십시오.
가있는 viewDidLoad에있는 UITableViewCell의 배경 색상을 취소하는 방법에 따라
UIImageView *tempImageView = [[UIImageView alloc]
initWithImage:[UIImage imageNamed:@"iPhone.jpg"]];
[tempImageView setFrame:self.tableView.frame];
self.tableView.backgroundView = tempImageView;
추가 코드 다음에 추가합니다.
- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath
{
cell.backgroundColor = [UIColor clearColor];
}
희망이 있습니다. 해피 코딩 :)
그래, 내가 보았던 약간의 변화와 함께 "self.tableView.backgroundView = tempImageView;" @pratik Mistry 감사합니다! UIImageView * tempImageView = [[UIImageView alloc] initWithImage : [UIImage imageNamed : @ "logoend.png"]]]; UIView * logoView = [[UIView alloc] initWithFrame : CGRectMake (0, 0, self.checkinsTable.frame.size.width, self.checkinsTable.frame.size.height)]; [logoView addSubview : tempImageView]; tempImageView.frame = CGRectMake (55, 100, 50, 50); self.checkinsTable.backgroundView = logoView; – user3236289
환영합니다! –