[英]viewDidAppear being called before WebService connection methods
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. ViewDidAppear方法我将断点放在操作的最后一步,但是将断点的viewDidAppear方法放在首先要尝试直接运行的地方。 Are emerging in connection using WebService.
使用WebService的连接正在兴起。 Be the first breakpoint while running webservice connections, calling the latest viewDidAppear.
在运行Web服务连接时成为第一个断点,并调用最新的viewDidAppear。 However, prior to providing breakpoint viewDidAppear when calling WebService connection, and this causes the value NULL to return.
但是,在调用WebService连接时提供断点viewDidAppear之前,这将导致返回值NULL。 In short, I would like to be called viewDidAppear method, after obtaining all the webservice connections.
简而言之,在获得所有Web服务连接之后,我想称为viewDidAppear方法。 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. 在系统将要显示视图之前,iOS系统会自行调用
viewDidAppear
。 If you want to perform some functions after didReceiveResponse
method, there is a method in NSURLConnectionDelegate
that can help you. 如果要在
didReceiveResponse
方法之后执行某些功能,则NSURLConnectionDelegate
中有一个可以帮助您的方法。
- (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. 连接成功加载完成后,可以使用此方法,并且您可以在此方法中执行
didRecieveRespose
之后编写要执行的功能。
You can read more about NSURLConnectionDelegateProtocol
methods here. 您可以在此处阅读有关
NSURLConnectionDelegateProtocol
方法的更多信息。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.