대신에 완전히 테이블을 다시로드, 당신은 insertRowsAtIndexPaths를 호출해야합니다 : withRowAnimation :
당신이 또한보다 훨씬 더 효율적입니다 (이
을 움직이는 방법을 지정하게됩니다 두 번째 옵션 모든 데이터를 매번 다시로드)
(이렇게하면 데이터가 이미 l이 된 후에 recievedImageFrom 서버가 호출된다는 가정을합니다. 데이터 소스 개체에 골치 아픈. 또한 myDataSourceArray는 테이블에 대해 데이터가 저장되는 배열이고 myTableView는 UITableView입니다.
-(void)recievedImageFromServer
{
NSUInteger row = [myDataSourceArray count]-1; // This can also be set to 0 if you want
// to insert at the top of the table
NSIndexPath* newIndex = [NSIndexPath indexPathWithIndex:row];
[myTableView insertRowsAtIndexPaths:[NSArray arrayWithObject:newIndex]
withRowAnimation:UITableViewRowAnimationTop];
}
그러면 데이터 소스에서 셀을 요청합니다.
몇 가지 코드를 게시 해주십시오. – Maheshbabu