2014年7月28日 星期一

頁面轉換


UIViewController *page2 = [self.storyboard instantiateViewControllerWithIdentifier:@"page2"];

Modal
[self presentViewController:page2 animated:YES completion:NULL];
The completion block is used for doing any tasks after presenting the view controller , the code written inside the completion block will execute only after the view is presented.
資料來源:http://stackoverflow.com/a/13025138

Push
[self.navigationController pushViewController:page2 animated:YES];