Вы можете использовать cellForRowAtIndexPath:
, чтобы получить ссылку на определенную ячейку в виде таблицы, пройдя по ее указательному пути, который известен в didSelectRowAtIndexPath:
. Когда у вас есть ссылка на эту ячейку, вы можете получить доступ к тем свойствам, которые вы хотите. Вот пример того, как получить текст с каждого из ярлыков ячейки.
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];
NSString *labelText = cell.textLabel.text;
NSString *detailText = cell.detailTextLabel.text;
}
Конечно, очень большое спасибо. –
Хм, когда я делаю вариант этого: - (void) tableView: (UITableView *) tableView commitEditingStyle: (UITableViewCellEditingStyle) editStyle forRowAtIndexPath: (NSIndexPath *) indexPath { { все, что он возвращает, является "Label" ??? NSString * CellIdentifier = @ "LocationsCell"; DatabasesTVCE * cell = [tableView dequeueReusableCellWithIdentifier: CellIdentifier forIndexPath: indexPath]; NSString * celltest = cell.displayDatabaseRecordNumber.text; –