1. 程式人生 > >iOS模態跳轉(加導航欄)

iOS模態跳轉(加導航欄)

模態跳轉加導航欄、

昨天改專案發現經常用的push跳轉突然不能用了 查看了程式碼才知道原來這個頁面的是上個頁面模態跳轉過來的,所以需要把導航欄也帶過來

//chooseVC是你需要跳轉的檢視

UINavigationController * navigation = [[UINavigationController alloc]initWithRootViewController:chooseVC];

        [self presentViewController:navigation animated:YES completion:^{

            chooseVC.view.backgroundColor=[UIColor colorWithPatternImage:viewImage];

        }];