看板 MacDev 關於我們 聯絡資訊
假設是A modally present B 進到B之後再來做push/pop view transition (是這樣嗎?) AViewController * aVC; BViewController * bVC = [[BViewController alloc] init]; UINavigationController* navVC = [[UINavigationController alloc] initWithRootViewController:bVC]; [aVC presentViewController:navVC animated: completion:]; 然後在BViewController裡要下一頁的時候 SomeViewController* someVC = ... [self.navigationController pushViewController:someVC ...]; BViewController要離開的時候 再做 self.navigationController dismissViewController...]; ※ 引述《redok (火焰)》之銘言: : UIViewController *vc = ...略...; : [vc presentViewController: animated: completion:]; : [vc dismissViewControllerWithAnimated: ...]; : 關於這種 present 新 view controller 跟 dismiss 原本的 view controller : 是說 一個 VC 只能 present 另一個 VC 嗎? : 那我今天頁面要進入好幾個下一頁之類的 : 我要紀錄所有的順序,然後依序 dismiss嗎? : 謝謝 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 1.34.186.156
redok:我是不想用到 navigation 單純用 view controller 的 12/09 13:29
redok:presentViewController 跟 dismissViewController QQ 12/09 13:29
redok:而不是 push / pop 12/09 13:30
redok:而是單純多頁面 都用 presentViewController 12/09 13:31
uranusjr:一個 view controller 只能/只應 present 一個 modal vc 12/09 18:17
howdiun:如果是想要動畫,push的動畫可以改寫 12/10 10:20
howdiun:如果是不想要bar,bar可以隱藏 12/10 10:21