我需要做一個自定義的演示動畫,當我設置這兩個setTransitioningDelegate和modalPresentationStyle = UIModalPresentationCustomviewDidAppear和viewDidDisappear不叫當modalPresentationStyle = UIModalPresentationCustom
動畫是完美的與除非viewDidAppear和viewDidDisappear不是在叫呈現viewcontroller.This是同爲蘋果的示例代碼中https://developer.apple.com/library/ios/samplecode/LookInside/Introduction/Intro.html
[overlay setTransitioningDelegate:[self transitioningDelegate]];
overlay.modalPresentationStyle=UIModalPresentationCustom;
[self presentViewController:overlay animated:YES completion:NULL];
時沒有給出modalPresentationStyle爲什麼調用的方法?
got.it.so我在視圖生命週期方法中獲得了一些邏輯,所以唯一的方法是移動它們?以及爲什麼在沒有給出modalPresentationStyle時調用方法? – guhan0
難道你不能創建一個委託,並根據你呈現的視圖控制器的邏輯在適當的時間調用委託方法嗎? – Snusmumrikken
這是另一個類似於你的問題:http://stackoverflow.com/questions/9621346/viewdiddisappear-not-called-when-use-presentviewcontroller?rq=1 – Snusmumrikken