#ifdef DEBUG UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"ERROR" message:@"JSON Parsing Error" delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil]; [alertView show]; [alertView release]; #endif
该代码在后台线程中执行(负责解析),错误只发生在其他时间.任何想法在这里有什么问题?
[someObject performSelectorOnMainThread:@selector(showDebug:) withObject:@"JSON Parsing Error" waitUntilDone:YES];