您的位置:首页 > 产品设计 > UI/UE

collectionView偏移到某一组某一行

2016-06-24 16:50 369 查看
NSIndexPath *collecIndexPath = [NSIndexPathindexPathForRow:0inSection:8];//偏移到某行某组

[self.myCollectionView scrollToItemAtIndexPath:scrollIndexPathatScrollPosition:UICollectionViewScrollPositionTopanimated:YES];

//附带tableview设置偏移量

NSIndexPath *tableviewIndexPath = [NSIndexPath
indexPathForRow:1
inSection:3];

[tableView scrollToRowAtIndexPath:scrollIndexPath

                 atScrollPosition:UITableViewScrollPositionTop animated:YES];
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息