2017年12月19日 星期二

[IOS] 監聽截圖

監聽截圖 screen shot





NSOperationQueue *mainQueue = [NSOperationQueue mainQueue];
    [[NSNotificationCenter defaultCenter] addObserverForName:UIApplicationUserDidTakeScreenshotNotification
                                                      object:nil
                                                       queue:mainQueue
                                                  usingBlock:^(NSNotification *note) {
                                                      
                                                      
                                                      NSLog(@"shot");
                                                      

                                                  }];

沒有留言:

張貼留言