NSInvalidArgumentException reason Receiver has no segue with identifier

后端 未结 4 2141
说谎
说谎 2021-02-07 20:18

I have problem I\'ve been sitting with. I have a UIViewController List and a UIViewController Login. On Login I have a button \"Done\", al

4条回答
  •  星月不相逢
    2021-02-07 20:33

    first, i believe segues should follow camel case rules. change to...

    loginToList
    

    second, disconnect and reconnect your views in ib.

    third, clean your project (shift-command-k).

    lastly, you should be using something like this method...

     - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
    {
        if ([[segue identifier] isEqualToString:@"loginToList"]) {
            [[segue destinationViewController] setDelegate:self];
        }
    
    }
    

    for your segue. then setup a delegate protocol method to dismiss the view controller.

提交回复
热议问题