Could not load NIB in bundle: 'NSBundle ··· with name 'chosenCountry''

后端 未结 3 1365
你的背包
你的背包 2021-01-29 05:09

I want touch the UIBarButtonItem in the top right, and push a new viewController. So, the code is:

UIBarButtonItem *addButton = [[UIBarButtonItem a         


        
3条回答
  •  萌比男神i
    2021-01-29 05:51

    Use this code it works for you

    UIStoryboard *mainStoryboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
    yourViewController *vc = [mainStoryboard instantiateViewControllerWithIdentifier:@"chosenCountry"];
    [self.navigationController pushViewController:vc animated:YES];
    

提交回复
热议问题