newkengsir's recent timeline updates
newkengsir

newkengsir

V2EX member #190626, joined on 2016-09-06 14:59:45 +08:00
newkengsir's recent replies
May 3, 2017
Replied to a topic by hiwower 杭州 日子过于平淡。。好难受
感觉卤煮是缺少运动
Jan 9, 2017
Replied to a topic by daiqiangbudainiu MacBook Pro Mac 版本的 Chrome 经常崩溃
我也是!!!!!
哈哈 你开心就好
Jan 4, 2017
Replied to a topic by Ministor Apple 1.6 出骚红色的耳机 带价来
............ 800 收
Dec 2, 2016
Replied to a topic by newkengsir iOS 分享最近收集的几个动画效果
@zrp1994 OK 你看这样的如何,大家都可以参与进来! https://github.com/CodeForApp/Code4AppGithubStars
```
func didReceive(_ response: UNNotificationResponse,
completionHandler completion: @escaping (UNNotificationContentExtensionResponseOption) -> Void) {

if response.actionIdentifier == Identifiers.cancelAction {
let request = response.notification.request

let identifiers = [request.identifier]

// Remove future notifications that have been scheduled
UNUserNotificationCenter.current().removePendingNotificationRequests(withIdentifiers: identifiers)

// Remove any notifications that have already been delivered so we're not cluttering up the user's notification center
UNUserNotificationCenter.current().removeDeliveredNotifications(withIdentifiers: identifiers)

// Visual feedback that notification has been cancelled
speakerLabel.text = "🔇"
speakerLabel.cancelShake()

completion(.doNotDismiss)
}
else {
completion(.dismiss)
}
}
```
func didReceive(_ response: UNNotificationResponse,
completionHandler completion: @escaping (UNNotificationContentExtensionResponseOption) -> Void) {

if response.actionIdentifier == Identifiers.cancelAction {
let request = response.notification.request

let identifiers = [request.identifier]

// Remove future notifications that have been scheduled
UNUserNotificationCenter.current().removePendingNotificationRequests(withIdentifiers: identifiers)

// Remove any notifications that have already been delivered so we're not cluttering up the user's notification center
UNUserNotificationCenter.current().removeDeliveredNotifications(withIdentifiers: identifiers)

// Visual feedback that notification has been cancelled
speakerLabel.text = "🔇"
speakerLabel.cancelShake()

completion(.doNotDismiss)
}
else {
completion(.dismiss)
}
}
...
About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   4514 Online   Highest 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 25ms · UTC 10:08 · PVG 18:08 · LAX 03:08 · JFK 06:08
♥ Do have faith in what you're doing.