如何获取某个地点的天气预报?
我想要获取当前位置的天气预报(未来 5 天的天气预报)。
我对 iOS 的天气 API(如 Yahoo、Google、Weather.com...)进行了研究。但是我无法找到使用天气 API(带有预测)的示例项目
如果有<示例项目或任何在我的应用程序中使用的免费天气预报服务。 请告诉我
提前谢谢你。
I want to get weather report (forecast for the next 5 days) of the current location.
I did a research about weather APIs for iOS like Yahoo, Google, Weather.com .... But I was unable to find an example project which uses weather API (with forecasting)
If there is any example project or any free weather report services to use in my application.
Please tell me
Thank u in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这个想法很简单..你必须寻找API,向其传递所需的参数
日期范围-国家/地区等..
..这将返回一个xml缓冲区..然后你可以使用和目标c XML 解析器 .. 尝试用 googleparse xml Objective c
搜索一下,你会发现很多文章。这是一个旧 SOF 主题的 API (http://stackoverflow.com/questions/5775488/to-display-weather-forecast-for-currentday-next-day-and-day-after-next-day-in -ip)。
The idea is so simple .. you have to look for the API , pass it the required parameters
Date range - country etc ..
.. this will return an xml buffer .. then you can use and objective c XML parser .. Try to googleparse xml objective c
and you'll find a lot of articles .Here's a sort of APIs form an old SOF topic (http://stackoverflow.com/questions/5775488/to-display-weather-forecast-for-currentday-next-day-and-day-after-next-day-in-ip).
也许您可以查看 Apple 的天气小部件,看看您是否可以观察该小部件如何与weather.yahoo.com 进行通信,或者只是通过 WebKit 或其他方式使用它。它位于 /Library/Widget/Weather.wdgt
Perhaps you could look at Apple's weather widget and see if you can observe how the widget communicates with weather.yahoo.com or just use it through WebKit or something. It's in /Library/Widget/Weather.wdgt