行 0 と 1 の間のこの奇妙な間隔を取り除くことはできません。行 0 と 1 の間の間隔を、行 1 と 2 の間と同じにしたいのです。
[self.tableView setBackgroundColor:TABLE_VIEW_BACKGROUND_COLOR];
UIView *headerView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, 250)];
UIImageView *headerBackgroundImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"addres_box"]];
[headerBackgroundImageView setFrame:CGRectMake(headerView.frame.origin.x + 10, headerView.frame.origin.y + 10, headerView.frame.size.width - 20, 160)];
[headerView addSubview:headerBackgroundImageView];
UILabel *headerTextLabel = [[UILabel alloc] initWithFrame:CGRectMake(headerBackgroundImageView.frame.origin.x + 10, headerBackgroundImageView.frame.origin.y + 10, headerBackgroundImageView.frame.size.width - 20, 20)];
[headerTextLabel setBackgroundColor:[UIColor clearColor]];
[headerTextLabel setFont:[UIFont boldSystemFontOfSize:headerTextLabel.font.pointSize]];
[headerTextLabel setTextColor:[UIColor whiteColor]];
[headerTextLabel setLineBreakMode:UILineBreakModeTailTruncation];
[headerTextLabel setNumberOfLines:0];
NSString *headerTextString = @"0";
NSString *detailTextString = @"1\n2";
[headerTextLabel setText:headerTextString];
[headerView addSubview:headerTextLabel];
_headerTextLabel = headerTextLabel;
UILabel *headerDetailTextLabel = [[UILabel alloc] initWithFrame:CGRectMake(headerTextLabel.frame.origin.x, headerTextLabel.frame.origin.y+20, headerTextLabel.frame.size.width, 140)];
[headerDetailTextLabel setBackgroundColor:[UIColor clearColor]];
[headerDetailTextLabel setTextColor:[UIColor whiteColor]];
[headerDetailTextLabel setLineBreakMode:UILineBreakModeTailTruncation];
[headerDetailTextLabel setNumberOfLines:0];
[headerDetailTextLabel setText:detailTextString];
[headerView addSubview:headerDetailTextLabel];
_headerDetailTextLabel = headerDetailTextLabel;
[self.tableView setTableHeaderView:headerView];
[self.tableView setSeparatorColor:TABLE_VIEW_SEPARATOR_COLOR];
[self.tableView setSeparatorStyle:UITableViewCellSeparatorStyleSingleLine];
誰かが私を助けてくれることを願っています!