1.viewDidLoad 里調用presentViewController(presentModalViewController)無效果的問題
場景:在viewDidLoad里面調用了presentViewController 發現沒有預期效果,最終放棄在該方法里面操作視圖控制器(用push 可以有預期的效果,why ?),放在了viewWillAppear里面去present
參考:When viewDidLoad is called, there is no guarantee that the view controller hierarchy is loaded in the navigation tree. Moving the logic to a later stage (for example: viewWillAppear) should resolve that issue as presentingController should be loaded by then.