目前,我仅在应用程序进入前台时才调用一种方法。如何在@selector中调用各种方法?
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(displayHappyFace)
name:UIApplicationWillEnterForegroundNotification
object:nil];
最佳答案
只需为所有其他功能创建一个单独的功能。
[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(AllFunction)
name:UIApplicationWillEnterForegroundNotification
object:nil];
所有功能。
-(void) AllFunction
{
[self displayHappyFace];
[self otherFunction];
}
关于ios - 如何在@selector中调用多个方法进行通知?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21396898/