0
我有一個命令,應該在特定的時間密集代碼執行之前加載子視圖。然而,該命令運行,及時的代碼執行,然後子視圖出現。有什麼我可以解決這個問題嗎?代碼執行前ipad子視圖不加載
progressViewController = [[ProgressView alloc] initWithNibName:@"ProgressView" bundle:[NSBundle mainBundle]];
[self.view addSubview:[progressViewController view]];
NSString *[email protected]"guy";
NSString *encodedName =[[NSString alloc] init];
int asci;
for(int i=0; i < [name length]; i++)
{
//NSLog(@"1");
asci = [name characterAtIndex:i];
NSString *str = [NSString stringWithFormat:@"%d,", asci];
encodedName =[encodedName stringByAppendingFormat: str];
}
NSString *urlString = [NSString stringWithFormat:@"someurl.com"];
NSURL *theUrl = [[NSURL alloc] initWithString:urlString];
NSString *result=[NSString stringWithContentsOfURL:theUrl];
result = [result substringFromIndex:61];
result = [result substringToIndex:[result length] - 20];
NSLog(result);
outLab.text=result;
[[progressViewController view] removeFromSuperview];