YJB YJB - 3 months ago 8x
Objective-C Question

How to open a new view on click of Table View Cell?

I am developing an iOS app which has a TableView, and I want to do sth that when a cell of the TableView is tapped, a new view opens (and then it can get back to the Table View.) I tried some things like working with segues and new view controllers, but it didn't work.


Implement the UITableViewDelegate protocol, and implement the method

- (void)tableView:(UITableView *)tableView
didSelectRowAtIndexPath:(NSIndexPath *)indexPath

Inside that method you can create your new view.