objective c - get result from connectionDidFinishLoading -


i don't know how result connectiondidfinishloading. have these codes:

connect.m:

- (void)connectiondidfinishloading:(nsurlconnection *)connection {     [[uiapplication sharedapplication] setnetworkactivityindicatorvisible:no];      nsstring *result = [[nsstring alloc] initwithbytes:[self.dataresponse bytes] length:[self.dataresponse length] encoding:nsutf8stringencoding]; } 

videos.m:

@property (nonatomic, retain) connect *connect;  - (void)viewdidload {     self.connect = [[connect alloc] initwithdelegate:self                                        onsuccess:@selector(responsesuccess:)                                          onerror:@selector(responseerror:)]; } 

i want know how get, in videos.m result connect.m

connectiondidfinishloading tells your done. you'll want implement protocol nsurlconnectiondatadelegate , use connection:didreceivedata: gather data.

be aware data comes in in multiple chunks, connection:didreceivedata: called multiple times , you'll have keep appending new chunk of data end until connectiondidfinishloading gets called.


Comments

Popular posts from this blog

java - How to specify maven bin in eclipse maven plugin? -

single sign on - Logging into Plone site with credentials passed through HTTP -

php - Why does AJAX not process login form? -