関数にこのコードを含むView Controllerを作成しましたviewDidLoad
:
[self addChildViewController:[self.storyboard instantiateViewControllerWithIdentifier:@"View1"]];
[self addChildViewController:[self.storyboard instantiateViewControllerWithIdentifier:@"View2"]];
[self addChildViewController:[self.storyboard instantiateViewControllerWithIdentifier:@"View3"]];
[self addChildViewController:[self.storyboard instantiateViewControllerWithIdentifier:@"View4"]];
[self addChildViewController:[self.storyboard instantiateViewControllerWithIdentifier:@"View5"]];
[self addChildViewController:[self.storyboard instantiateViewControllerWithIdentifier:@"View6"]];
[self addChildViewController:[self.storyboard instantiateViewControllerWithIdentifier:@"View7"]];
[self addChildViewController:[self.storyboard instantiateViewControllerWithIdentifier:@"View8"]];
[self addChildViewController:[self.storyboard instantiateViewControllerWithIdentifier:@"View9"]];
[self addChildViewController:[self.storyboard instantiateViewControllerWithIdentifier:@"View10"]];
[self addChildViewController:[self.storyboard instantiateViewControllerWithIdentifier:@"View11"]];
[self addChildViewController:[self.storyboard instantiateViewControllerWithIdentifier:@"View12"]];
[self addChildViewController:[self.storyboard instantiateViewControllerWithIdentifier:@"View13"]];
[self addChildViewController:[self.storyboard instantiateViewControllerWithIdentifier:@"View14"]];
新しいViewControllerを開いて、次のコードで最初のViewControllerに戻ると:
UIViewController *vc = [self.storyboard instantiateViewControllerWithIdentifier:@"Home"];
vc.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
[self presentViewController:vc animated:YES completion:NULL];
メモリ警告を受けました。