[英]Asynchronous calls to web-services - iPhone (PHP web-services)
Can anyone tell me about some classes which calls the web-services asynchronously. 谁能告诉我一些异步调用Web服务的类。 Currently I am writing all the asynchronous functions in the .m files of xibs but I want to write them in a separate files like web-service handler classes.
目前,我正在xibs的.m文件中编写所有异步函数,但我想将它们写在单独的文件中,例如Web服务处理程序类。
Thanks 谢谢
In XCode, choose File/New, choose Cocoa Touch Class, choose Objective-C class. 在XCode中,选择“文件/新建”,再选择“ Cocoa Touch类”,再选择“ Objective-C类”。 Code up your web-services methods in this class.
在此类中编写您的Web服务方法的代码。 You could use NSURL or the ASI library .
您可以使用NSURL或ASI库 。 You can instantiate this class from a view controller (for example).
您可以从视图控制器实例化此类(例如)。
use ASIHTTPRequest to handle webservices .. read this blog - 使用ASIHTTPRequest处理网络服务..阅读此博客-
http://www.raywenderlich.com/2965/how-to-write-an-ios-app-that-uses-a-web-service http://www.raywenderlich.com/2965/how-to-write-an-ios-app-that-uses-a-web-service
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.