나는 UITableView
이고 다시 나타날 행을 움직이게하고 싶습니다. 또한 애니메이션 사이를 전환하려면 일부 셀이 UITableViewRowAnimationLeft
과 다른 셀 UITableViewRowAnimationRight
을 가져야합니다. 하지만 내 UITableViewController
함께이 기능을 구현하는 방법을 모르겠습니다. 나는 cellForRowAtIndexPath
에 코드의 다음 줄을 삽입하려고 :스크롤 할 때 UITableViewCells 슬라이드
[self.tableView beginUpdates];
NSArray *updatePath = [NSArray arrayWithObject:indexPath];
[self.tableView reloadRowsAtIndexPaths:updatePath
withRowAnimation:UITableViewRowAnimationLeft];
[self.tableView endUpdates];
대신 셀에 슬라이딩의, 세포의 순서가 변경 또는 그들 중 일부는 두 번 나타났다. 또한 셀 생성 후이 줄을 삽입하려고했습니다.
if (cell == nil) {
...
} else {
[self.tableView beginUpdates];
NSArray *updatePath = [NSArray arrayWithObject:indexPath];
[self.tableView reloadRowsAtIndexPaths:updatePath
withRowAnimation:UITableViewRowAnimationLeft];
[self.tableView endUpdates];
Thx. 나는 당신의 해결책을 시도 할 것입니다. 첫 번째 행을 초기화 할 때이 기능을 구현하는 것이 좋지 않을 것이라고 생각합니다. 이런 식으로하면 초기로드시 문제가 될까요? –
그냥 보는 방법에 따라 달라집니다. –
메시지를 작성한 사람에 따라 대화이며 메시지와 함께 행이 왼쪽 또는 오른쪽으로 움직여야합니다. –