【iOS 】把一些不太重要的任务放在空时执行
2015-04-06 15:22 l4y 阅读(212) 评论(0) 收藏 举报-(void)idleNotificationMethod
{
    
}
-(void)registerForIdleNotification
{
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(idleNotificationMethod) name:@"IdleNotification" object:nil];
    NSNotification *notification = [NSNotification notificationWithName:@"IdleNotification" object:nil];
    [[NSNotificationQueue defaultQueue] enqueueNotification:notification postingStyle:NSPostWhenIdle];
}
本文来自博客园,作者:l4y,转载请注明原文链接:https://www.cnblogs.com/xjshi/p/4396015.html
 
                    
                 
                
            
         浙公网安备 33010602011771号
浙公网安备 33010602011771号