ViewDidAppear method I put breakpoint in the last step of the operation, but the breakpoint viewDidAppear method of putting at first, trying to run it directly. Are emerging in connection using WebService. Be the first breakpoint while running webservice connections, calling the latest viewDidAppear. However, prior to providing breakpoint viewDidAppear when calling WebService connection, and this causes the value NULL to return. In short, I would like to be called viewDidAppear method, after obtaining all the webservice connections. Breakpoint when it's like this, but when I want to work in the same way.
- (void)viewDidAppear:(BOOL)animated
{
[self LabelYukle];
[super viewDidAppear:animated];
}
-(void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response
{
if(theConnection)
[webData setLength:0];
}
viewDidAppear
is called by iOS system on its own just before view is going to be appeared. If you want to perform some functions after didReceiveResponse
method, there is a method in NSURLConnectionDelegate
that can help you.
- (void)connectionDidFinishLoading:(NSURLConnection *)connection
This method is used when a connection has finished loading successfully and you can write the functions you want to perform after didRecieveRespose
here in this method.
You can read more about NSURLConnectionDelegateProtocol
methods here.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.