0
我需要得到關於模態視圖控制器演示的通知,我知道我可以使用NSNotificationCenter
發帖並觀察我的自定義通知,但是我想知道這些通知是否已經存在。
謝謝,
Andrea當視圖控制器以模態方式加載新的視圖控制器時,有沒有辦法通知?
我需要得到關於模態視圖控制器演示的通知,我知道我可以使用NSNotificationCenter
發帖並觀察我的自定義通知,但是我想知道這些通知是否已經存在。
謝謝,
Andrea當視圖控制器以模態方式加載新的視圖控制器時,有沒有辦法通知?
我找到了解決方案。我剛剛創建一個抽象類,將覆蓋呈現模式的看法,這樣的方法:
- (void) presentModalViewController:(UIViewController *)modalViewController animated:(BOOL)animated{
[[NSNotificationCenter defaultCenter] postNotificationName:PresentingModal object:self];
[super presentModalViewController:modalViewController animated: animated];
}
當然還有我所有的視圖控制器繼承它。
希望這會有所幫助。