Passing data between two controllers using storyboards

前端 未结 4 972
时光取名叫无心
时光取名叫无心 2021-01-16 04:53

I am trying to pass data from one UITableViewController to another. This is my code in the initial view controller:

- (void)tableView:(UITableVi         


        
4条回答
  •  一生所求
    2021-01-16 05:37

    Implement prepareForSegue and pass date in this methos

    - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
    {
    if([seque.identifier isEqualToString:@"showDetail"])
    {
    ListsViewController *lists = seque.destinationViewController;
    lists.subject = subject;
    }
    }
    

提交回复
热议问题