Skip to content
This repository has been archived by the owner on Apr 24, 2022. It is now read-only.

Commit

Permalink
animatingToTab getter method defined
Browse files Browse the repository at this point in the history
  • Loading branch information
Ilter Cengiz committed Sep 21, 2013
1 parent 0fbba16 commit 6d90555
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions ICViewPager/ICViewPager/ViewPagerController.m
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@ @interface ViewPagerController () <UIPageViewControllerDataSource, UIPageViewCon
@property NSMutableArray *contents;

@property NSUInteger tabCount;
@property (assign) BOOL isAnimatingToTab;
@property (getter = isAnimatingToTab, assign) BOOL animatingToTab;

@property (nonatomic) NSUInteger activeTabIndex;
@property (nonatomic) NSUInteger activeTabIndex;

@end

Expand Down Expand Up @@ -132,7 +132,7 @@ - (void)didReceiveMemoryWarning {

- (IBAction)handleTapGesture:(id)sender {

self.isAnimatingToTab = YES;
self.animatingToTab = YES;

// Get the desired page's index
UITapGestureRecognizer *tapGestureRecognizer = (UITapGestureRecognizer *)sender;
Expand All @@ -153,7 +153,7 @@ - (IBAction)handleTapGesture:(id)sender {
direction:UIPageViewControllerNavigationDirectionReverse
animated:YES
completion:^(BOOL completed) {
weakSelf.isAnimatingToTab = NO;
weakSelf.animatingToTab = NO;

// Set the current page again to obtain synchronisation between tabs and content
dispatch_async(dispatch_get_main_queue(), ^{
Expand All @@ -168,7 +168,7 @@ - (IBAction)handleTapGesture:(id)sender {
direction:UIPageViewControllerNavigationDirectionForward
animated:YES
completion:^(BOOL completed) {
weakSelf.isAnimatingToTab = NO;
weakSelf.animatingToTab = NO;

// Set the current page again to obtain synchronisation between tabs and content
dispatch_async(dispatch_get_main_queue(), ^{
Expand Down Expand Up @@ -264,7 +264,7 @@ - (void)defaultSettings {
_pageViewController.dataSource = self;
_pageViewController.delegate = self;

self.isAnimatingToTab = NO;
self.animatingToTab = NO;
}
- (void)reloadData {

Expand Down Expand Up @@ -469,7 +469,7 @@ - (void)scrollViewDidScroll:(UIScrollView *)scrollView {
[self.origPageScrollViewDelegate scrollViewDidScroll:scrollView];
}

if (!self.isAnimatingToTab) {
if (![self isAnimatingToTab]) {
UIView *tabView = [self tabViewAtIndex:self.activeTabIndex];

// Get the related tab view position
Expand Down

0 comments on commit 6d90555

Please sign in to comment.