iphone:Using-the-users-location
出自UXGuide.net
请帮助我们修订和更新本文的译文部分
本文的译文部分可能是由多个贡献者提供或从不同的渠道收集,未经过最终审阅和整理,请您帮助我们一起修订和更新本文的译文部分。
利用用户的位置
Using the User’s Location
Users appreciate application features that allow them to automatically tag content with their physical location, or to find friends that are currently nearby. Users also appreciate being able to disable features like these when they don’t want to share their location with others. Users can grant (or deny) system-wide access to their physical location with the Location Services setting in Settings > General.
用户喜欢使他们能够根据内容的物理位置自动标记它们的应用程序,或寻找目前正在附近的朋友。当用户不想与他人分享关于他们所在位置的信息时,他们同样希望能有禁用的功能。在全系统范围内,用户可以通过在为之服务设置里,设定给予(或拒绝)告知他们的位置信息。
If users turn off Location Services, and later use an application feature that requires their location, they see an alert that tells them they must change their preference before they can use the feature. The alert does not allow them to make this change within the application; instead, they must go to Settings and change their preference. This ensures that users are fully aware that they are granting system-wide permission to use their location information.
如果用户关闭位置服务,随后使用应用程序某个的功能,却需要他们的位置,他们将会看到一个警告,告诉他们必须改变选择,才可以使用该功能。警告不允许他们在这个应用程序内的改变,相反,他们必须找到“设置”,然后改变他们的选择。这可确保用户充分认识到,在整个系统中他们拥有使用自己位置信息的许可。
To help users understand why they might need to turn Location Services on, it’s best if they see the alert only when they attempt to use a feature that clearly needs to know their current location. For example, people can use Maps when Location Services is off, but they see the alert when they access the feature that finds and tracks their current location.
为了帮助用户了解为什么他们可能需要打开位置服务上,最好,如果他们看到警告只有当他们尝试使用功能,显然需要了解自己的当前位置。例如,人们可以使用地图时,定位服务是关闭的,但他们看到警告时,访问的功能,发现和跟踪他们的位置。
If Location Services is turned off, iPhone OS displays the alert the first time your application tries to access location information. The Core Location framework provides a way for you to get the user’s preference so that you can avoid triggering this alert unnecessarily or inappropriately. (See Core Location Framework Reference to learn more about this programming interface.)
如果定位服务是关闭的,当你的应用程序第一次尝试访问位置信息时,iPhone操作系统显示提醒。Core Location Framework 位置的核心框架提供了一种方法让你可以掌握用户的喜好,以便你可以避免不必要的或不适当的触发此警告。(要了解更多此编程接口信息,参见Core Location Framework Reference。)
With knowledge of the user’s preference, you can trigger the alert as closely as possible to the feature that requires location information, or perhaps avoid it altogether.
有了用户喜好信息,你可以触发一些警告,它们与需要位置信息的功能尽可能接近,或者完全避免这些警告。
- If your application cannot perform its primary function without this information, it’s best if users see the alert as soon as they start your application. Users will not be bothered by this, because they understand that the main function of your application depends on knowing their location.
- 如果没有用户位置信息,你的应用程序无法执行它的主要职能,最好是让你的用户在启动应用程序时就看到警告。这样用户将不会感到困扰,因为他们明白,你的应用程序的主要功能依赖于他们自己的位置信息。
- If the user’s location is not part of the essential function of your application, you might choose to simply restrict the feature that uses it. For example, when Location Services is turned off, Camera automatically turns off the feature that adds the user’s location to the photos they take. It does not prevent users from taking photos unless they change their preference, because adding location information to photos is appreciated, but not essential.
- 如果用户的位置不是你的应用程序基本功能的一部分,你可以选择简单地限制用到它的功能。例如,当位置服务是关闭的,相机会自动关闭在他们拍的照片中增加用户位置信息的功能。它不会阻止用户拍照,除非用户改变他们自己的选择,因为在照片中添加位置信息是额外功能,并非必不可少。
- If a feature needs location information to function, be sure to avoid making any programmatic calls that trigger the alert before the user actually selects the feature. (The call that gets the user’s preference does not trigger the alert.) This way, you avoid causing users to wonder why your application wants their location information when they’re doing something that doesn’t appear to need it.
- 如果一个功能需要定位信息,一定要避免在用户实际选择这个功能之前有任何可以触发警告的与计划有关的要求,(获得用户的喜好的要求不会触发警告。)这样,你就可以避免使用户产生疑惑,为什么你的应用程序希望得到他们的位置信息,而他们正在做的一些事情,似乎并没有这个必要。