From XIB to Storyboard

£可爱£侵袭症+ 提交于 2019-12-03 16:28:55

you can get back to your storyboard by simply dismissing the modal view controller. Like this:

- (IBAction)backPressed:(id)sender {
    [self dismissModalViewControllerAnimated:YES];
}

You should put this method in your ShowDreamNIBController. As for the second question, you can send back information to the view controller that presented the modal view controller by getting reference to it using delegation.

EDIT: To "send information to the XIB" do you mean that you want to set information to the view controller that you want to present? If yes, than use this when you present the modal controller:

ShowDreamNIBController *detailViewController = [[ShowDreamNIBController alloc]initWithNibName:nil bundle:nil];
[detailViewController setSomething: something];
[detailViewController setAnotherThing: anotherThing];
[self presentModalViewController:detailViewController animated:nil];

I hope this helps.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!