了解 API
我知道有很多 API,如 JSON、Facebook、Twitter 等用于在 iPhone 上开发相关应用程序,但如何理解 API?这可能是一个愚蠢的问题,但我想知道如何?您对初学者有什么建议?
I know that there are many API's like JSON, Facebook, Twitter etc for developing related applications on iPhone, but how to understand an API? This might be a silly question but I want to know how? What would you suggest for for a beginner?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您应该查找相关文档并阅读一些利用 API 的代码示例。
如果您正在寻找有关 iphone 的信息(如标签所示),请仔细阅读信息 示例代码。如果经过一番努力和谷歌搜索后你确实不明白如何让某些东西发挥作用,那么你可以随时在 StackOverflow 上提问。
You should find relevant documentation and read through some code examples utilizing the API.
If you are looking for information about the iphone, as the tag suggests, then read through the information here. There is an entire section dedicated to sample code. If you really can't understand how to make something work after some effort and some googling, then you can always ask on StackOverflow.
当我在项目中添加新的 API 时,我通常会浏览文档以查找与我的项目相关的主题,然后在查看一些示例代码后,我通常会开始尝试代码以获得所需的结果就是这样,因为 API 是短期使用的,您不应该将宝贵的时间浪费在一个 API 上。步骤是,1)找到相关主题,然后2)阅读示例代码,3)编写您自己的代码以获得所需的结果。 4) 通过该 API。
干杯
阿亚兹·阿拉维
When ever I came through adding new API in my project I usually scan though documentation to find relevant topic to my project then after looking at the some sample code I usually start experimenting with the code to get the desired results and thats it because API is for short term use, you should not waste your precious time on just one API. So steps are, 1) find the relevant topic then 2) read sample code and 3) write your own code to get the desired results. 4) through away that API.
Cheers
Ayaz Alavi
如果是开源的,请从头到尾阅读代码。或者要了解为什么以某种方式设计事物,可以尝试重新实现部分 API。
If it's open source, read the code from beginning to end. Or to see why things were designed in a certain way, maybe try reimplementing parts of the API.