The steps for this section are as follows:这一节的步骤如下:Try out a local notification just to see how it works尝试本地通知,看看它是如何工作的Allow the user to pick a due date for to-do items.允许用户选择在待办事项中选择一个日期。Create a date picker control.创建一个日期选择器控制。Schedule local notifications for the to-do items, and update them when the user changes the due date.安排本地通知要做的项目,当用户更改和更新他们的截止日期。Before you wonder about how to integrate this in the app, let’s just schedule a local notification and see what happens.之前你想知道如何集成这个应用,我们就安排本地通知,看看会发生什么。By the way, local notifications are different from push notifications. Push allows your app to receive messages about external events, such as your favorite team winning the World Series.顺便说一下,本地通知不同于推送通知。不推送通知允许应用程序接收消息关于外部事件,比如你最喜欢的团队赢得了世界系列赛。Local notifications are more similar to an alarm clock: you set a specific time and then it “beeps”.本地通知更类似于闹钟:你设定一个具体的时间,然后它“beeps”响。As of iOS 8, an app is only allowed to show local notifications after it has asked the user for permission. If the user denies permission, then any local notifications for your app simply won’t appear. You only need to ask for permission once, so let’s do that first.iOS 8,应用程序只允许要求获取用户许可后才能显示本地通知。如果用户拒绝权限,那么任何本地应用程序的通知根本不会出现。你只需要请求批准一次,所以让我们先这样做。