Closed gaojinhsu closed 4 years ago
+1 希望增加苹果系统相册那种滚动 最好加上多个联动
同求滚动速度
(void)scrollToItemAtIndexSection:(TYIndexSection)indexSection animate:(BOOL)animate { if (_numberOfItems <= 0 || ![self isValidIndexSection:indexSection]) { //NSLog(@"scrollToItemAtIndex: item indexSection is invalid!"); return; }
if (animate && [_delegate respondsToSelector:@selector(pagerViewWillBeginScrollingAnimation:)]) { [_delegate pagerViewWillBeginScrollingAnimation:self]; } CGFloat offset = [self caculateOffsetXAtIndexSection:indexSection];
[UIView beginAnimations:nil context:NULL]; [UIView setAnimationDuration:2]; [_collectionView setContentOffset:CGPointMake(offset, _collectionView.contentOffset.y)]; // [_collectionView setContentOffset:CGPointMake(offset, _collectionView.contentOffset.y) animated:animate]; [UIView commitAnimations];
}
这样加完,界面只显示当前的一个cell,显示有问题
scrollview decelerationRate
希望支持调整滚动速度