在 iPhone 模拟器中设置位置 [英] Set the location in iPhone Simulator

查看:34
本文介绍了在 iPhone 模拟器中设置位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在 iPhone 模拟器中设置位置(在 CoreLocation 服务中获取)?

How can I set the location (as it's picked up in CoreLocation services) in the iPhone Simulator?

推荐答案

从 iOS 5 开始,模拟器有一个可配置的位置.

As of iOS 5, the simulator has a configurable location.

在Debug菜单下,最后一个条目是Location";这为您提供了一个子菜单:

Under the Debug menu, the last entry is "Location"; this gives you a sub menu with:

  • 自定义位置
  • 苹果专卖店
  • 苹果
  • 城市自行车骑行
  • 城市跑
  • 高速公路车道

自定义位置可让您输入纬度/经度值.骑自行车、City Run 和 Freeway Drive 是对移动位置的模拟(当然是在库比蒂诺).

Custom Location lets you enter a Lat/Long value. Bicycle ride, City Run, and Freeway Drive are simulation of a moving location (in Cupertino, of course).

当然,这对 iOS 4(或更早版本)的调试没有帮助;但这是一个明确的改进!

Of course, this does nothing to help with debugging for iOS 4 (or earlier); but it's a definite improvement!

这篇关于在 iPhone 模拟器中设置位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆