目前我使用StoryBoard为iPad开发。另外我添加一个ViewController.xib文件和一个视图。现在我想把按钮从xib返回到故事板。我的代码在下面,但这不起作用。从xib到故事板的后退按钮
UIStoryboard *storyBoard = [UIStoryboard storyboardWithName:@"MainStoryboard" bundle:nil];
UIViewController *initViewController = [storyBoard instantiateInitialViewController];
[self.navigationController pushViewController:initViewController animated:YES];
你如何展示这个视图控制器?从故事板场景? – bl4stwave 2014-12-13 07:20:44
故事板到xib我正在使用下面的代码。 UITableViewCell * selectedCell = [tableView cellForRowAtIndexPath:indexPath]; NSString * cellText = selectedCell.detailTextLabel.text; NSLog(@“item title:%@”,cellText); ViewController * vc = [[ViewController alloc] initWithNibName:@“ViewController”bundle:nil]; self.window.rootViewController = self.viewController; vc.strFullName = cellText; [self.view addSubview:vc.view]; – Saravanan 2014-12-13 07:34:10
我希望我的回答可以帮助您 – bl4stwave 2014-12-13 07:46:22