UITableView滚动到指定位置

#pragma mark 滚动到相应位置
- (void)scrollWithType:(NSInteger)type {
    NSIndexPath * dayOne = [NSIndexPath indexPathForRow:0 inSection:type];
    [self.myTableView scrollToRowAtIndexPath:dayOne atScrollPosition:UITableViewScrollPositionTop animated:YES];
}

猜你喜欢

转载自my.oschina.net/u/2519763/blog/1785462