У меня есть UITabBarController с более чем 5 UITabBarItems, поэтому доступен доступ к функции moreNavigationController.
В моем UITabBarController Delegate я делаю следующее:
- (void)tabBarController:(UITabBarController *)tabBarController didSelectViewController:(UIViewController *)viewController
{
//do some stuff
//...
UITableView *moreView = (UITableView *)self.tabBarController.moreNavigationController.topViewController.view;
moreView.delegate = self;
}
Я хочу реализовать UITableViewDelegate, чтобы я мог захватить выбранную строку, установить собственное свойство вида и затем нажать контроллер вида:
- (void)tableView:(UITableView *)tblView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
//how can I get the text of the cell here?
}
Мне нужно получить текст ячейки, когда пользователь нажимает на строку. Как я могу это сделать?