iOS基于文本标签文本推送视图
我已经 didSelectRowAtIndexPath 根据所选行号选择视图,即:
if (indexPath.row == 1) {
DetailViewController *detail = [self.storyboard instantiateViewControllerWithIdentifier:@"IdentifierFromStoryboard"];
[self.navigationController pushViewController:detail animated:YES];
}
但由于我现在已经实现了搜索栏,我宁愿根据所选单元格中的 cell.textLabel.text 选择视图。我将如何实现这一目标?
I have didSelectRowAtIndexPath selecting views based on the row number selected, i.e.:
if (indexPath.row == 1) {
DetailViewController *detail = [self.storyboard instantiateViewControllerWithIdentifier:@"IdentifierFromStoryboard"];
[self.navigationController pushViewController:detail animated:YES];
}
But as I've now implemented a search bar I'd rather be selecting the views based on the cell.textLabel.text from the cell selected. How would I achieve this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
编辑
您可以使用 cellForRowAtIndexPath 获取单元格
Edit
You can get the cell by using cellForRowAtIndexPath