Вы всегда можете добавить две кнопки в последнюю ячейку.
- (NSInteger)tableView:(UITableView *)aTableView numberOfRowsInSection:(NSInteger)section {
return [myCellDataArray count]+1;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
UITableViewCell *cell = nil;
if (indexPath.row > [myCellDataArray count]) {
cell = [tableView dequeueReusableCellWithIdentifier:@"Button Cell"];
if (cell == nil) {
UIButton *firstButton = [[UIButton alloc] init];
//customization
UIButton *secondButton = [[UIButton alloc] init];
//customization
[cell addSubView:firstButton];
[cell addSubView:firstButton];
}
} else {
// normal stuff
}
Если вы хотите настроить существующие кнопки, вам нужно установить для этого тега нечто уникальное, например firstButton.tag = 100
, а затем установить firstButton с помощью firstButton = (UIButton *)[cell viewWithTag:100];
.Убедитесь, что вы определили firstButton
так, чтобы он находился в области видимости!
Надеюсь, это поможет!