Instantly share code, notes, and snippets.

Embed
What would you like to do?
private func showNotification() {
print("showNotification")
// Notification生成
let myNotification: UILocalNotification = UILocalNotification()
// メッセージ代入
myNotification.alertBody = "Test"
// Timezone設定
myNotification.timeZone = NSTimeZone.defaultTimeZone()
// Notificationを表示
UIApplication.sharedApplication().scheduleLocalNotification(myNotification)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment