これは現在私のセルがどのように見えるかです:http ://tinypic.com/view.php?pic = 344uz2a&s = 6
ご覧のとおり、何らかの理由で、セルの右側の部分をbackgroundColor白で塗りつぶすことを拒否しています。そして、なぜ、または何が問題なのか、私にはわかりません。
これが、TableView/Cellsを実装した方法です。viewDidLoadで、tableView全体をclearColorに設定して、「emptyCells」を非表示にします。
- (void)viewDidLoad{
self.tableView.tableFooterView = [[UIView alloc] initWithFrame:CGRectZero];
tableView.backgroundColor = [UIColor clearColor];
}
以下の方法では、セルのbackgroundColorを設定しようとしています。残念ながら、上記のように、セル内でwhiteColorを右側に設定することを拒否します。
- (UITableViewCell *)tableView:(UITableView *)pTableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"SearchCell";
UITableViewCell *cell = [pTableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil)
{
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
}
Task *task = [self.searchResults objectAtIndex:indexPath.row];
UILabel *nameLabel = (UILabel *)[cell viewWithTag:1];
UILabel *bookLabel = (UILabel *)[cell viewWithTag:2];
UILabel *chapterLabel = (UILabel *)[cell viewWithTag:3];
[nameLabel setText:task.name];
[bookLabel setText:task.book.name];
[chapterLabel setText:task.chapter.name];
cell.backgroundColor = [UIColor whiteColor];
cell.contentView.backgroundColor = [UIColor whiteColor];
cell.backgroundView.backgroundColor = [UIColor whiteColor];
return cell;
}
何か案は?この「色」の問題を解決するために、私は何を見逃しましたか、または何ができますか?よろしくお願いします