나는 100px 아래로 표시하고 싶은 UITableView가 있습니다. 어떤 이유로 animated가 YES로 설정된 경우에만 작동합니다. 왜 이런거야?setContentOffset 애니메이션이 YES로 설정된 경우에만 작동합니다.
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
/*[self.tableView scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:1 inSection:0]
atScrollPosition:UITableViewScrollPositionNone
animated:NO];*/
/*[self.tableView scrollToRowAtIndexPath:[NSIndexPath indexPathWithIndex:1]
atScrollPosition:UITableViewScrollPositionNone
animated:NO];*/
[self.tableView setContentOffset:CGPointMake(0,100) animated:YES];
}
높이를 동적으로 만드는 방법이 있습니까? –