简体   繁体   中英

UISplitViewController with Storyboard 2 levels TableView

I have a UISplitViewController created with the XCode Template and using StoryBoard. It works fine showing in detail the row selected data in te masterView.

I want to add another tableview in the masterView, to have 2 levels of masterView. In the first tableview show item 0, Item 1, Item 2. Then when tap in one of these push another tableview in the same MasterView with other row values.

Thanks

In MasterViewController.m, add the following code.

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
    NewMasterViewController *masterViewController = [[NewMasterViewController alloc] init];
    [self.navigationController pushViewController:masterViewController animated:YES];
} 

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM