1
I가 완전히 삭제와 함께, 정렬 등 세포에 추가 될 때 나는 UITableViewCell
페이딩, 중동 또는 아래처럼 애니메이션을 설정하는 방법애니메이션
를 삽입하고, UITableView
작업 UITableViewCellEditingStyleInsert
을 사용할 때가 아니라 배열에서 항목을 추가 할 때가 아니라 UITableView를 사용하는 경우
I가 완전히 삭제와 함께, 정렬 등 세포에 추가 될 때 나는 UITableViewCell
페이딩, 중동 또는 아래처럼 애니메이션을 설정하는 방법애니메이션
를 삽입하고, UITableView
작업 UITableViewCellEditingStyleInsert
을 사용할 때가 아니라 배열에서 항목을 추가 할 때가 아니라 UITableView를 사용하는 경우
추가 한 각 객체에 대해 (insertRowsAtIndexPaths:withRowAnimation:
) 셀을 삽입하려 했습니까?
아마 어떤 :
- (void)addContentFromArray:(NSArray *)array {
[self.tableView beginUpdates];
NSMutableArray *indexPaths = [NSMutableArray arrayWithCapacity:[array count]];
for (id object in array) {
NSIndexPath *newIndexPath = [NSIndexPath indexPathForRow:[self.dataSource count] inSection:0];
[self.dataSource addObject:object];
}
[self.tableView insertRowsAtIndexPaths:indexPaths withRowAnimation:UITableViewRowAnimationAutomatic];
[self.tableView endUpdates];
}
임 현재 사용 '- (NSInteger)를 tableView (jQuery과 *)를 tableView numberOfRowsInSection (NSInteger) 섹션 { 창 [어레이 카운트]; }'및 (UITableViewCell *) tableView : (UITableView *) tableView cellForRowAtIndexPath : (NSIndexPath *) indexPath {리턴 셀;}' – feco