From 44a78ad30d500220b9744bf8decac66483ea67ba Mon Sep 17 00:00:00 2001 From: aSomethings Date: Mon, 3 Dec 2018 16:31:43 +0900 Subject: [PATCH 1/2] Fixed "Selected Font not working" --- .../TYPagerController/TabPager/TYTabPagerBarLayout.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TYPagerControllerDemo/TYPagerController/TabPager/TYTabPagerBarLayout.m b/TYPagerControllerDemo/TYPagerController/TabPager/TYTabPagerBarLayout.m index d48b005..26fd66e 100644 --- a/TYPagerControllerDemo/TYPagerController/TabPager/TYTabPagerBarLayout.m +++ b/TYPagerControllerDemo/TYPagerController/TabPager/TYTabPagerBarLayout.m @@ -207,7 +207,7 @@ - (void)transitionFromCell:(UICollectionViewCell *)fr fromCell.transform = CGAffineTransformMakeScale(_selectFontScale, _selectFontScale); } if (toCell) { - toCell.titleLabel.font = _normalTextFont; + toCell.titleLabel.font = _selectedTextFont ? _selectedTextFont : _normalTextFont; toCell.titleLabel.textColor = _selectedTextColor ? _selectedTextColor : _normalTextColor; toCell.transform = CGAffineTransformIdentity; } From b6bfc5f09e9a78edf604b64d1d8f8a20b53416d8 Mon Sep 17 00:00:00 2001 From: aSomethings Date: Tue, 4 Dec 2018 18:42:34 +0900 Subject: [PATCH 2/2] Added Scrolling Animation When Tab Bar Touch --- TYPagerControllerDemo/TYPagerController/TYPagerViewLayout.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TYPagerControllerDemo/TYPagerController/TYPagerViewLayout.m b/TYPagerControllerDemo/TYPagerController/TYPagerViewLayout.m index b716485..c36b35c 100644 --- a/TYPagerControllerDemo/TYPagerController/TYPagerViewLayout.m +++ b/TYPagerControllerDemo/TYPagerController/TYPagerViewLayout.m @@ -278,7 +278,7 @@ - (void)scrollToItemAtIndex:(NSInteger)index animate:(BOOL)animate { } [self scrollViewWillScrollToView:_scrollView animate:animate]; - [_scrollView setContentOffset:CGPointMake(index * CGRectGetWidth(_scrollView.frame),0) animated:NO]; + [_scrollView setContentOffset:CGPointMake(index * CGRectGetWidth(_scrollView.frame),0) animated:animate]; [self scrollViewDidScrollToView:_scrollView animate:animate]; }