0
在我的ViewController中,我連接到一個Web服務來驗證用戶憑證並等待它們是否有效。所述NSURLConnection的是從IBAction爲按鈕按壓執行:iOS 5 NSURLConnectionLoader Segue之後的線程行爲
// Executes after a successful connection and data download
-(void) connectionDidFinishLoading:(NSURLConnection *)connection
{
// Stop the spinners
[[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:NO];
[aiSpinner stopAnimating];
//Perform actions based on the status code
switch(statusCode)
{
// Success
case 200:
{
[self performSegueWithIdentifier:@"SegueFromLogin" sender:self];
break;
}
// Bad Request - incorrect POST parameters
case 400:
{
// Display error
break;
}
// Other cases
default:
break;
}
}
當下一個故事板視圖是在加載的過程中,該線程「螺紋6 com.apple.NSURLConnectionLoader」仍然是活動的。我應該關心這一點,並且是連接完成後執行方法調用和繼續的正確方法嗎?