我有一個表格視圖,如圖所示。它顯示來自數據庫的各種歐洲語言。當我滾動tableview時,滾動不平滑,有時會卡住一兩秒鐘。什麼可能是錯的?iPHONE:TableView滾動不順暢 - 有什麼可能是錯誤的?
我使用下面的代碼進行解碼的語言:
NSString *cellText = [[langArray objectAtIndex:i] valueForKey:[NSString stringWithFormat:@"%@",lblshortName.text]];
if (cellText != (NSString *)[NSNull null] && ![cellText isEqualToString:@""]) {
NSString *decodedString3 = [NSString stringWithUTF8String:[cellText cStringUsingEncoding:[NSString defaultCStringEncoding]]];
[cellTextArray addObject:[NSString stringWithFormat:@"%@ : %@",lblshortName.text, decodedString3]];
}
else {
[cellTextArray addObject:@"<empty>"];
}
聽起來像是典型的iOS我:) – raidfive 2011-02-12 04:43:04