看板 MacDev 關於我們 聯絡資訊
大家好,目前我程式的架構是 RootViewController (Rotated) ---ViewController1 (NonRotated) ---ViewController2 (Rotated) 我會在RootViewController.m裡面 [self presentViewController:viewController1 animated:YES completion:nil]; ,然後我的ViewController會告訴RootViewController,請它切換到ViewController2 然後我會這樣做,如下 [self dismissViewControllerAnimated:NO completion:nil]; [self presentViewController:viewController2 animated:YES completion:nil]; 可以這樣做會看到RootViewControlle的View, //////////////////////////////////////////////////////////////////////////// 有沒有辦法能做到如同我在ViewController1裡面做 [self presentViewController:viewController2 animated:YES completion:nil]; 此時的架構會比較像 RootViewController----ViewController1----ViewController2 謝謝... -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 118.163.14.75 ※ 編輯: s8911124 來自: 118.163.14.75 (05/08 14:23)
darktt:可以在dismiss的completion裡用block完成它 05/08 18:29
[self dismissViewControllerAnimated:NO completion:^{ [self presentViewController:viewController2 animated:YES completion:nil];}]; 還是看的到RootViewController的View底圖。 是我誤會了嗎? ※ 編輯: s8911124 來自: 118.163.14.75 (05/09 15:30)