2015-08-20 28 views

回答

1

當過一個推送通知收到您可以發佈一個通知像下面

[[NSNotificationCenter defaultCenter] postNotificationName:@"PushNotificationReceived" object:nil]; 

,並在控制器類,你可以觀察的通知,並做你想做什麼都可以使用nsnotification觀察家

[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(reloadWebview:) name:@"PushNotificationReceived" object:nil]; 

這是其中一種方式。

相關問題