【发布时间】:2010-05-26 23:01:23
【问题描述】:
我有一个 UITableView,我希望它向下显示 100 像素。出于某种原因,这仅在动画设置为 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];
}
【问题讨论】:
标签: iphone objective-c cocoa-touch uitableview