Appleがホリデーに入ったので、自分のアプリを作る気力が減ってる。mixiのiOSTrainingをまたやることにした。
HomeWork 1.2 UIViewControllerとModalViewController · mixi-inc/iOSTraining Wiki · GitHub
modalを閉じて、modalを出すという課題。下のやつを書いた。
-(void)didPressCloseButton{ [self dismissViewControllerAnimated:YES completion:^{ SecondViewController *vc = [[SecondViewController alloc] initWithNibName:@"SecondViewController" bundle:nil]; vc.delegate = self; [self presentViewController:vc animated:YES completion:nil]; }]; }
リポジトリ(レポジトリ?)に解答が載っているのかと思って、調べたけど、空欄だった。
https://github.com/mixi-inc/iOSTraining/blob/master/HomeWorks/1.2/EternalForceModal/EternalForceModal/EFMViewController.m