예. 테이블의 내용 오프셋을 수동으로 변경하고 테이블의 reload 함수를 호출해야합니다. 그는 테이블의 맨 위로 스크롤하여 내용을 업데이트 할 때이 사용자가 보는 같은 효과를 생성합니다 :
self.navigationItem.rightBarButtonItem = [[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemRefresh target:self action:@selector(reload)] autorelease];
:
///////////////////////////////////////////////////////////////////////////////////////////////////
- (void)reload {
if ([self.tableView.delegate isKindOfClass:[TTTableViewDragRefreshDelegate class]]) {
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:ttkDefaultFastTransitionDuration];
self.tableView.contentOffset = CGPointMake(0, -60.0f);
[UIView commitAnimations];
}
[super reload];
}
하고, 그냥이 다시로드 기능을 사용하여 버튼을 추가
데이터를 캐시에 저장하면 새로 고치려면 표시되는 드래그가 즉시 표시되고 숨겨 지므로 데이터 소스를 무효화하여 업데이트해야 할 수도 있습니다.
감사합니다. D – bluezald