私はiOSアプリケーションを手に入れましたUITableView
このテーブルのセルをカスタマイズしましたが、オブジェクトの数が画面に表示されているセルよりも少ない場合、他のすべてのセルは単純な UITableViewCells のように見えます。
このように見えるはずです
すべてのセルをカスタマイズするにはどうすればよいですか?
dataSource のUPDコード:
pragma mark - Table view data source
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
// Return the number of sections.
return 1;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
// Return the number of rows in the section.
return [dataBase.showMaps count];
}
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
return 70;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"Cell";
ShowMapCell *cell = (ShowMapCell*) [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[ShowMapCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
}
// Configure the cell...
ShowMap *sM = [dataBase.showMaps objectAtIndex:indexPath.row];
//cell.textLabel.text = sM.name;
[cell initShowMapCell:sM index:indexPath.row];
return cell;
}