Bug Fix - Button Bar Selection on Current Page Issues

When you select button for current page, selected bar does not update when you scroll container scroll view. The reason is that 'shouldUpdateButtonBarView' varaible does not reset back to true, because [UIScrollViewDelegate scrollViewDidEndScrollingAnimation] is never called when you select button for current page.

I resolved this issue by avoiding current page selection by comparing NSIndexPath.item with self.currentIndex.
This commit is contained in:
James Chong 2015-08-04 16:35:25 +09:00
parent eee769bb3f
commit 2117299cbd
1 changed files with 3 additions and 0 deletions

View File

@ -168,6 +168,9 @@
- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath
{
if (indexPath.item == self.currentIndex)
return;
[self.buttonBarView moveToIndex:indexPath.item animated:YES swipeDirection:XLPagerTabStripDirectionNone];
self.shouldUpdateButtonBarView = NO;