ios本地通知可以定时刷新通知内容吗?如何做到??求各位技术大牛

解决方案 »

  1.   

    先添加通知  
      [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(changeSelfViewColor:) name:KFinishAction object:nil];  发送通知
      [[NSNotificationCenter defaultCenter]postNotificationName:KFinishAction object:nil userInfo:@{@"myColor": [self randomColor]}];//执行通知的方法
    - (void)changeSelfViewColor:(NSNotification *)sender{
        UIColor *myColor = sender.userInfo[@"myColor"];
        [self.view setBackgroundColor:myColor];
    }