读书人

uitableview滚动到最后一起

发布时间: 2012-08-27 21:21:57 作者: rapoo

uitableview滚动到最后一行

- (void)scrollTableToFoot:(BOOL)animated {    NSInteger s = [self.chatTable numberOfSections];if (s<1) return;NSInteger r = [self.chatTable numberOfRowsInSection:s-1];if (r<1) return;NSIndexPath *ip = [NSIndexPath indexPathForRow:r-1 inSection:s-1];[self.chatTable scrollToRowAtIndexPath:ip atScrollPosition:UITableViewScrollPositionBottom animated:animated];}

读书人网 >移动开发

热点推荐