YJB YJB - 1 year ago 69
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.

Answer Source

Implement the UITableViewDelegate protocol, and implement the method

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

Inside that method you can create your new view.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download