я получил заявление Ios с UITableView
Пользовательские пустые ячейки в UITabelView
Я настроить ячейки в этой таблице, но когда количество объектов ниже, чем видимые ячейки на экране, все остальные клетки выглядят как простое UITableViewCells.
Он должен выглядеть как этот
Как я должен настроить все клетки?
UPD Код для DataSource:
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;
}
введите код ссылки здесь :) – iPatel
Пожалуйста, разместите свой код, в частности, свой источник данных и методы делегирования для UITableView. – Tim
@iPatel вы можете увидеть мой код в upd. –