簡體   English   中英

UIViewController默認過渡動畫不起作用

[英]UIViewController default transition animation not working

我想呈現viewController的模態navigationController ,然后按陸續視圖x-seconds ,但由於某些原因,在firstsecond view都沒有動畫呈現。 我試圖在主線程上dispatch UIdispatch UI相關的代碼,但沒有解決該錯誤。

我先對兩個視圖都使用navigationController.setViewControllers([vc]), animated: true) ,然后再使用rootViewController.present(navigationController, animated: true)

知道為什么動畫丟失了嗎?

嘗試使用

Self.layoutIfNeeded()

當以present modally ,應該presentViewController方法。 pushnavigationController ,應使用pushViewController 如果你想present第一,說VC1目前NC2 (有VC2根)。 然后,您應該使用NC2pushViewController

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM