【发布时间】:2014-12-26 01:52:28
【问题描述】:
当我按下返回按钮时,我不知道如何按原样加载我的页面。我有两种类型的页面故事板和 xib。显示所有信息,当我单击转到按钮时,它将转到新页面。所有这些工作都很好,但我的问题是当我按下后退按钮时,我需要我的故事板和 xib 文件应该显示在同一个视图中。当我运行我的应用程序时,它只显示未加载的情节提要页面 xib。
感谢提前,这是我的代码:
- (IBAction)back:(id)sender {
Recharge *view = [self.storyboard instantiateViewControllerWithIdentifier:@"Recharge"];
[self presentViewController:view animated:YES completion:nil];
self.recharge = [[mobileViewcontroller alloc]init];
self.recharge.view.frame = CGRectMake(0,100, 400, 400);
[self addChildViewController:self.recharge];
[self.view addSubview:self.recharge.view];
}
【问题讨论】:
标签: ios iphone storyboard xib