如何在应用程序外拍摄屏幕时获取我们应用程序的本地通知"Open Image with our app" "sleep/wake" &"home"按钮



我需要有我的应用程序的本地通知"打开截图与我们的应用程序",当截图时,同时使用其他应用程序在ios如"whatsapp",并通过持有"睡眠/唤醒"截图&"home"按钮,应该有一个本地通知从我的应用程序打开屏幕拍摄的图像与我的应用程序,如"Stich&share"在android..这可能在Ios(我的应用程序可能在后台运行)?

是的,你可以用UIApplicationUserDidTakeScreenshot

let mainQueue = NSOperationQueue.mainQueue()
NSNotificationCenter.defaultCenter().addObserverForName(UIApplicationUserDidTakeScreenshot,
object: nil,
queue: mainQueue) { notification in
        // executes after screenshot
}

相关内容

最新更新