iphone - viewDidAppear being called before WebService connection methods -
viewdidappear method put breakpoint in last step of operation, breakpoint viewdidappear method of putting @ first, trying run directly. emerging in connection using webservice. first breakpoint while running webservice connections, calling latest viewdidappear. however, prior providing breakpoint viewdidappear when calling webservice connection, , causes value null return. in short, called viewdidappear method, after obtaining webservice connections. breakpoint when it's this, when want work in same way.
- (void)viewdidappear:(bool)animated { [self labelyukle]; [super viewdidappear:animated]; } -(void)connection:(nsurlconnection *)connection didreceiveresponse:(nsurlresponse *)response { if(theconnection) [webdata setlength:0]; }
viewdidappear
called ios system on own before view going appeared. if want perform functions after didreceiveresponse
method, there method in nsurlconnectiondelegate
can you.
- (void)connectiondidfinishloading:(nsurlconnection *)connection
this method used when connection has finished loading , can write functions want perform after didrecieverespose
here in method.
you can read more nsurlconnectiondelegateprotocol
methods here.
Comments
Post a Comment