iPhone开发教程之处理常见任务课件

上传人:我*** 文档编号:148519764 上传时间:2020-10-20 格式:PPTX 页数:32 大小:98.76KB
返回 下载 相关 举报
iPhone开发教程之处理常见任务课件_第1页
第1页 / 共32页
iPhone开发教程之处理常见任务课件_第2页
第2页 / 共32页
iPhone开发教程之处理常见任务课件_第3页
第3页 / 共32页
iPhone开发教程之处理常见任务课件_第4页
第4页 / 共32页
iPhone开发教程之处理常见任务课件_第5页
第5页 / 共32页
点击查看更多>>
资源描述

《iPhone开发教程之处理常见任务课件》由会员分享,可在线阅读,更多相关《iPhone开发教程之处理常见任务课件(32页珍藏版)》请在金锄头文库上搜索。

1、iPhone开发教程之处理常见任务(2),启用推送通知 通知的类型 标记类型 声音类型 提醒类型 使你的程序具有无障碍性 重要提示 提供搜索功能并显示搜索结果 利用用户的位置,When you register your application with Apple Push Notification Service, you can arrange to alert users when new data arrives, even if your application isnt running. When a device receives a message for an applic

2、ation that isnt running, it can notify the user by: 当你为你的应用程序注册苹果推送通知服务时后,当接收到新的数据后,即可安排提醒予以用户(提醒新数据),即使你的应用程序没有运行。当设备接收到某个未运行应用程序的信息时,它可以这样通知用户:,iPhone开发教程之启用推送通知,Updating a badge on the applications Home screen icon在应用程序的主屏幕图标上显示徽章 Playing an alert sound播放提醒声 Displaying an alert message显示一个提醒信息 or

3、 some combination of these. The user might respond by starting the application to manage the new data or merely acknowledging its arrival. (To learn how to handle push notifications in code, see Apple Push Notification Service Programming Guide.) 或者任意组合上述的通知方式。用户对通知的反应可能有,启动此应用程序去管理一下新数据,或者只是了解通知的到达

4、(而不采取任何操作)。(要了解如何用代码处理推送通知,参见苹果推送通知服务编程指南。),iPhone开发教程,Note:Delivery of push notifications is not guaranteed. Also, users can refuse to receive notifications system-wide. Push notifications are intended to notify users of new data, not to deliver critical data to your application. 注意:推送通知的发送不是有保证的。同

5、时,用户可以全系统地拒绝接收通知。推送通知的目的是通知用户有新数据,并不会向你的应用程序写入重要数据。,iPhone开发教程,The Notifications section in the built-in Settings application hosts push notification settings for every application that registers for the Apple Push Notification Service. For each application, iPhone OS provides settings for users to

6、allow or disallow badging, sounds, and alert messages. 内置的设置应用程序中的通知设置部分主导着推送通知的设置,它对每个注册了苹果推送通知服务的应用程序都提供了设置。对于每个应用程序,iPhone操作系统都提供给用户允许或不允许,标记,声音,提醒的三种方式的通知。,iPhone开发教程,Take some time to think about the types of events for which users would appreciate notification. A notification should give users

7、 useful, actionable information they want to receive, even when theyre not using your application. 请花一些时间想想什么类型事件的通知是用户希望的。通知应给予用户那些有用的,可付诸操作的信息,即使他们没有使用你的应用程序。,iPhone开发教程,After youve identified the events your users are likely to care about, you should also allow users to decide which events should

8、 generate what type of notification, if any. If you dont allow users to customize the push notification experience in your application, youre liable to pester users with notifications theyre not interested in. 当你已经确定应用程序的哪些事件用户可能会关心之后,如果有的话,你也应该允许你的用户决定哪些事件使用什么类型的通知。如果你不允许用户自定义应用程序中的推送通知的体验,你就容易让用户陷

9、入与他们不感兴趣的通知的纠缠之中。,iPhone开发教程,Users can choose which types of notifications they want to receive, so you should support all three types: 用户可以选择他们想要接受哪些类型的通知,所以你应该支持所有三种类型:,iPhone开发教程之通知的类型,Badge. Badging is the least intrusive way to tell users that there is new content they might be interested in. T

10、he badge is a small red oval that appears over the upper-right corner of your Home screen icon. You do not have any control over the appearance of the badge and it contains only numbers, not letters or punctuation. 标记。标记是打扰程度最小的方式告知用户有新的他们感兴趣的内容。标记出现是在主界面应用图标右上角的一个红色小椭圆。你不能对标记的出现做任何控制,它只包含数字,没有字母和标点

11、。,iPhone开发教程之标记类型,Badging works well when you want to tell users how many items are waiting for their attention. For example, the number in a badge might indicate unread messages, newly assigned tasks, or how many remote players are currently playing a game. 当你想要告诉用户有多少通知项在等待他们的注意时,标记很有效。例如,在一个标记里数目

12、可能会显示未读消息,新分配的任务,或者是当前远程参与者。,iPhone开发教程,Sound. You can supply a custom alert sound, or you can use a built-in alert sound. If you create a custom sound, be sure it is short, distinctive, and professionally produced. (To learn about the technical requirements for this sound, see “Preparing Custom Ale

13、rt Sounds” in Apple Push Notification Service Programming Guide.) Note that you cannot force the device to vibrate when a notification is delivered; the user has control over whether alerts are accompanied by vibration. 声音。你可以提供一个自定义提醒声音,也可以使用内置的提醒声。如果你创建一个自定义的声音,请确保它是短暂的,独特的,专业化制作的。 (要了解有关这个声音的技术要求

14、,在苹果推通知服务编程指南中参见“准备自定义提醒声音”。)请注意你不能强迫设备发出通知时振动;应该由用户控制是否警告伴随振动。,iPhone开发教程之声音类型,An easily recognized sound is ideal for situations in which the notification arrival itself provides enough information for users to act. For example, a collaborative task management system might use a unique sound to ac

15、company the completion of a members assignment. Merely hearing this sound tells the user that the assignment has been completed. 在通知到达的时候,提供一个容易识别的声音是十分理想的选择,因为它提供足够的信息给予用户反应。例如,一个用于多人协作完成任务的管理系统,可以使用一个独特的声音,伴随成员任务的完成。仅仅听到这个声音,用户就会知道已经完成了任务。,iPhone开发教程,Alert. An alert is the most intrusive way to no

16、tify users of new content. An alert displays your application name at the top, your message below that, and one or two buttons at the bottom. If you specify two buttons, the alert displays the Close button on the left and the View button on the right (users can tap the View button to simultaneously dismiss the alert and launch your application). If you specify one button, the alert displays an OK button. The Close button and the OK button both dismiss the alert without opening your application.

展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 办公文档 > PPT模板库 > PPT素材/模板

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号