서버에서 내 셀의 데이터를 가져올 때 테이블 뷰를 보는 데 문제가 있습니다. 사진을 사용하지 않으면 스크롤이 끊어지지 않지만 이미지도 사용하고 싶습니다. 아무도 내가 이것을 해결할 수있는 방법을 알고 있습니까? 내 서버의 plist에서 데이터를 가져오고 있습니다. 여기 uitableview에서 스크롤이 끊어짐
는 스크롤 휴식을 만드는 이미지의 코드- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath];
if (cell == nil) {
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
}
NSURL *URL = [[NSURL alloc] initWithString:[[self.content objectAtIndex:indexPath.row] valueForKey:@"imageName"]];
NSData *URLData = [[NSData alloc] initWithContentsOfURL:URL];
UIImage *img = [[UIImage alloc] initWithData:URLData];
UIImageView *imgView = (UIImageView *)[cell viewWithTag:100];
imgView.image = img;
....
는 "휴식"무엇을 의미합니까 :
는 여기에 몇 가지 예제 코드인가? –
스크롤을 아래로 스크롤 할 때 작은 휴식을 한 다음 스크롤합니다. 내가 이미지에 댓글을 달았고 일어나지 않는 이미지가 없다면. –
@JimmyLee의 답변 확인 –