.net - Do I need a separate class file for each web method when calling from objective-c? -
i little confused how handle web service result in objective-c...
i want put web service calls in 1 class file name webservices.h,.m
but every web method shares same delegate datareceived , parsing xml.
how know result call if exists in 1 class?
if i'm understanding question correctly, can this. have different instances of "web services," such nsurlconnection , compare connection passed delegate method instance. example of using multiple nsurlconnections in 1 class:
in webservices.h:
nsurlconnection *connection1; nsurlconnection *connection2; nsmutabledata *receiveddata1; nsmutabledata *receiveddata2; in webservices.m:
- (void) connection:(nsurlconnection *)connection didreceivedata:(nsdata *)data { if (connection == connection1) { [receiveddata1 appenddata:data]; } else if (connection == connection2) { [receiveddata2 appenddata:data]; }
Comments
Post a Comment