0
我有一個NSDictionary
有很多嵌套的數據。所有這些數據在我的UIViewController
中加載一次,然後重新加載我的UITableView
,使用此數據填充其單元格的標籤,這些標籤在單獨的xib
中設置。所有的加載過程發生得非常快,但我的UITableView
的滾動變得非常緩慢。我首先想到的可能是每次分配一個單元格時加載的xib
,所以我測試了默認的UITableViewCell
而不是加載它,但沒有任何更改。 這個問題是由我訪問我的數據的方式引起的嗎?我做了以下內容:由於NSDictionary嵌套數據,UITableView滾動緩慢?
NSDictionary *match = dictionaryMatches[@"dates"][indexPath.section][@"matches"][indexPath.row];
homeTeamAbbreviationLabel.text = match[@"home"];
visitorTeamAbbreviationLabel.text = match[@"visitor"];
matchTimeLabel.text = match[@"time"];
leagueLabel.text = match[@"league"];
homeNameLabel.text = match[@"home_name"];
visitorNameLabel.text = match[@"visitor_name"];
而且這一代碼進入內部- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
任何建議也將不勝感激。