우선 테이블 뷰를 스크롤하는 동안 메모리 누수가 발생합니다. here과 동일한 문제입니다.iOS5 : UITableView 열악한 스크롤링 성능
또한 내 스크롤은 충분히 빠르지 만 스크롤하는 동안 '떨림'이라고합니다. 세포는 재사용이 가능합니다.
코드 :
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"Cell";
Country *country=[[self.items objectAtIndex:[indexPath section]] objectAtIndex:[indexPath row]];
CountryCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
cell.imageView.image=[UIImage imageNamed:country.countryFlag];
cell.countryName.text=country.countryName;
cell.currencyCode.text=country.code;
cell.currencyOriginalName.text=country.originalUnitName;
return cell;
}
앱 : 아이폰 OS 5, ARC, 스토리 보드.
이 tableView 동작의 실제 이유는 무엇이며 어떻게 수정해야합니까?
CountryCell 펜촉의 셀 ID를 "셀"로 설정 했습니까? 펜촉을 registerNib : forCellReuseIdentifier :?와 함께 등록 했습니까? – JiaYow
은 사용자 지정 높이 또는 알려진 성능 문제가있는 다른 대리자 메서드를 사용하는 셀입니까? –
country.countryFlag 이미지의 크기는 어느 정도입니까? 그 이미지는 어디서 오는거야? – sosborn