1. 程式人生 > >ios -UIbutton(按鈕)之間的介面跳轉

ios -UIbutton(按鈕)之間的介面跳轉

[self.navigationController pushViewController:nextVC animated:YES];//從當前介面到nextVC這個介面

   [self.navigationController popViewControllerAnimated:YES];//nextVC這個介面回到上一介面

    [self.navigationController popToRootViewControllerAnimated:YES];//回到根檢視介面

     //self.navigationController.viewControllers 是一個數組裡面存放所有之前push過來的介面,如果想要跳回到指定介面 只需要根據索引值取出響應的介面pop回去