diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..313e4f0 Binary files /dev/null and b/.DS_Store differ diff --git a/.gitignore b/.gitignore index a3cd143..06870cc 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ # Xcode -# +.DS_Store build/ *.pbxuser !default.pbxuser diff --git a/XLPagerTabStrip.xcodeproj/project.pbxproj b/XLPagerTabStrip.xcodeproj/project.pbxproj index 68dd73b..a6337e8 100644 --- a/XLPagerTabStrip.xcodeproj/project.pbxproj +++ b/XLPagerTabStrip.xcodeproj/project.pbxproj @@ -28,6 +28,9 @@ 28B63AF11A45B26600225C66 /* XLPagerTabStripViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 28B63AEC1A45B26600225C66 /* XLPagerTabStripViewController.m */; }; 28B63AF21A45B26600225C66 /* XLSegmentedPagerTabStripViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 28B63AEE1A45B26600225C66 /* XLSegmentedPagerTabStripViewController.m */; }; 28B63AF51A465E5E00225C66 /* ReloadExampleViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 28B63AF41A465E5E00225C66 /* ReloadExampleViewController.m */; }; + 66C6E4B41AB9D538005361FB /* FXPageControl.m in Sources */ = {isa = PBXBuildFile; fileRef = 66C6E4B11AB9D538005361FB /* FXPageControl.m */; }; + 66CA35B41A8D174900564221 /* XLTwitterPagerTabStripViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 66CA35B31A8D174900564221 /* XLTwitterPagerTabStripViewController.m */; }; + C262204E1AD44A4D002E5226 /* TwitterExampleViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = C262204D1AD44A4D002E5226 /* TwitterExampleViewController.m */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -82,6 +85,12 @@ 28B63AEE1A45B26600225C66 /* XLSegmentedPagerTabStripViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = XLSegmentedPagerTabStripViewController.m; path = Controllers/XLSegmentedPagerTabStripViewController.m; sourceTree = ""; }; 28B63AF31A465E5E00225C66 /* ReloadExampleViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ReloadExampleViewController.h; sourceTree = ""; }; 28B63AF41A465E5E00225C66 /* ReloadExampleViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ReloadExampleViewController.m; sourceTree = ""; }; + 66C6E4B01AB9D538005361FB /* FXPageControl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FXPageControl.h; sourceTree = ""; }; + 66C6E4B11AB9D538005361FB /* FXPageControl.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FXPageControl.m; sourceTree = ""; }; + 66CA35B21A8D174900564221 /* XLTwitterPagerTabStripViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = XLTwitterPagerTabStripViewController.h; path = Controllers/XLTwitterPagerTabStripViewController.h; sourceTree = ""; }; + 66CA35B31A8D174900564221 /* XLTwitterPagerTabStripViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = XLTwitterPagerTabStripViewController.m; path = Controllers/XLTwitterPagerTabStripViewController.m; sourceTree = ""; }; + C262204C1AD44A4D002E5226 /* TwitterExampleViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TwitterExampleViewController.h; sourceTree = ""; }; + C262204D1AD44A4D002E5226 /* TwitterExampleViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TwitterExampleViewController.m; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -123,6 +132,7 @@ 28B63A881A459F5900225C66 /* XLPagerTabStrip */ = { isa = PBXGroup; children = ( + 66C6E4AF1AB9D538005361FB /* FXPageControl */, 28B63ACC1A45A4CD00225C66 /* XL */, 28B63AAF1A45A4C500225C66 /* Demo */, 28B63A8D1A459F5900225C66 /* AppDelegate.h */, @@ -162,15 +172,17 @@ 28B63AAF1A45A4C500225C66 /* Demo */ = { isa = PBXGroup; children = ( + 28B63AB41A45A4C500225C66 /* ChildViewController */, + 28B63ABC1A45A4C500225C66 /* Helpers */, 28B63AB01A45A4C500225C66 /* BarExampleViewController.h */, 28B63AB11A45A4C500225C66 /* BarExampleViewController.m */, 28B63AB21A45A4C500225C66 /* ButtonBarExampleViewController.h */, 28B63AB31A45A4C500225C66 /* ButtonBarExampleViewController.m */, - 28B63AB41A45A4C500225C66 /* ChildViewController */, - 28B63ABC1A45A4C500225C66 /* Helpers */, - 28B63ABF1A45A4C500225C66 /* PagerSlidingTabStrip.gif */, 28B63AC01A45A4C500225C66 /* SegmentedExampleViewController.h */, 28B63AC11A45A4C500225C66 /* SegmentedExampleViewController.m */, + C262204C1AD44A4D002E5226 /* TwitterExampleViewController.h */, + C262204D1AD44A4D002E5226 /* TwitterExampleViewController.m */, + 28B63ABF1A45A4C500225C66 /* PagerSlidingTabStrip.gif */, 28B63AC21A45A4C500225C66 /* Storyboard.storyboard */, ); path = Demo; @@ -241,10 +253,21 @@ 28B63AEC1A45B26600225C66 /* XLPagerTabStripViewController.m */, 28B63AED1A45B26600225C66 /* XLSegmentedPagerTabStripViewController.h */, 28B63AEE1A45B26600225C66 /* XLSegmentedPagerTabStripViewController.m */, + 66CA35B21A8D174900564221 /* XLTwitterPagerTabStripViewController.h */, + 66CA35B31A8D174900564221 /* XLTwitterPagerTabStripViewController.m */, ); name = Controllers; sourceTree = ""; }; + 66C6E4AF1AB9D538005361FB /* FXPageControl */ = { + isa = PBXGroup; + children = ( + 66C6E4B01AB9D538005361FB /* FXPageControl.h */, + 66C6E4B11AB9D538005361FB /* FXPageControl.m */, + ); + path = FXPageControl; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -294,6 +317,7 @@ TargetAttributes = { 28B63A851A459F5900225C66 = { CreatedOnToolsVersion = 6.1.1; + DevelopmentTeam = 6F2G55XL63; }; 28B63A9E1A459F5900225C66 = { CreatedOnToolsVersion = 6.1.1; @@ -348,6 +372,8 @@ 28B63AC51A45A4C500225C66 /* ChildExampleViewController.m in Sources */, 28B63AF11A45B26600225C66 /* XLPagerTabStripViewController.m in Sources */, 28B63AC41A45A4C500225C66 /* ButtonBarExampleViewController.m in Sources */, + C262204E1AD44A4D002E5226 /* TwitterExampleViewController.m in Sources */, + 66CA35B41A8D174900564221 /* XLTwitterPagerTabStripViewController.m in Sources */, 28B63ADC1A45A4CD00225C66 /* XLBarView.m in Sources */, 28B63AC81A45A4C500225C66 /* XLJSONSerialization.m in Sources */, 28B63ADD1A45A4CD00225C66 /* XLButtonBarView.m in Sources */, @@ -362,6 +388,7 @@ 28B63AF01A45B26600225C66 /* XLButtonBarPagerTabStripViewController.m in Sources */, 28B63A8C1A459F5900225C66 /* main.m in Sources */, 28B63AC61A45A4C500225C66 /* TableChildExampleViewController.m in Sources */, + 66C6E4B41AB9D538005361FB /* FXPageControl.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/XLPagerTabStrip/.DS_Store b/XLPagerTabStrip/.DS_Store new file mode 100644 index 0000000..3fbdcf6 Binary files /dev/null and b/XLPagerTabStrip/.DS_Store differ diff --git a/XLPagerTabStrip/AppDelegate.h b/XLPagerTabStrip/AppDelegate.h index 52e62a2..a1a1a0e 100644 --- a/XLPagerTabStrip/AppDelegate.h +++ b/XLPagerTabStrip/AppDelegate.h @@ -2,7 +2,7 @@ // AppDelegate.h // XLPagerTabStrip ( https://github.com/xmartlabs/XLPagerTabStrip ) // -// Copyright (c) 2014 Xmartlabs ( http://xmartlabs.com ) +// Copyright (c) 2015 Xmartlabs ( http://xmartlabs.com ) // // // Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/XLPagerTabStrip/AppDelegate.m b/XLPagerTabStrip/AppDelegate.m index 2a4dea2..1109df2 100644 --- a/XLPagerTabStrip/AppDelegate.m +++ b/XLPagerTabStrip/AppDelegate.m @@ -2,7 +2,7 @@ // AppDelegate.m // XLPagerTabStrip ( https://github.com/xmartlabs/XLPagerTabStrip ) // -// Copyright (c) 2014 Xmartlabs ( http://xmartlabs.com ) +// Copyright (c) 2015 Xmartlabs ( http://xmartlabs.com ) // // // Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/XLPagerTabStrip/Demo/BarExampleViewController.h b/XLPagerTabStrip/Demo/BarExampleViewController.h index 57f1ac9..16d8c19 100644 --- a/XLPagerTabStrip/Demo/BarExampleViewController.h +++ b/XLPagerTabStrip/Demo/BarExampleViewController.h @@ -2,7 +2,7 @@ // BarContainerViewController.h // XLPagerTabStrip ( https://github.com/xmartlabs/XLPagerTabStrip ) // -// Copyright (c) 2014 Xmartlabs ( http://xmartlabs.com ) +// Copyright (c) 2015 Xmartlabs ( http://xmartlabs.com ) // // // Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/XLPagerTabStrip/Demo/BarExampleViewController.m b/XLPagerTabStrip/Demo/BarExampleViewController.m index a452f6f..a1ea503 100644 --- a/XLPagerTabStrip/Demo/BarExampleViewController.m +++ b/XLPagerTabStrip/Demo/BarExampleViewController.m @@ -2,7 +2,7 @@ // BarContainerViewController.m // XLPagerTabStrip ( https://github.com/xmartlabs/XLPagerTabStrip ) // -// Copyright (c) 2014 Xmartlabs ( http://xmartlabs.com ) +// Copyright (c) 2015 Xmartlabs ( http://xmartlabs.com ) // // // Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/XLPagerTabStrip/Demo/ButtonBarExampleViewController.h b/XLPagerTabStrip/Demo/ButtonBarExampleViewController.h index afcdbd8..23c8aa0 100644 --- a/XLPagerTabStrip/Demo/ButtonBarExampleViewController.h +++ b/XLPagerTabStrip/Demo/ButtonBarExampleViewController.h @@ -2,7 +2,7 @@ // ButtonContainerViewController.h // XLPagerTabStrip ( https://github.com/xmartlabs/XLPagerTabStrip ) // -// Copyright (c) 2014 Xmartlabs ( http://xmartlabs.com ) +// Copyright (c) 2015 Xmartlabs ( http://xmartlabs.com ) // // // Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/XLPagerTabStrip/Demo/ButtonBarExampleViewController.m b/XLPagerTabStrip/Demo/ButtonBarExampleViewController.m index ad9c1d5..9872fae 100644 --- a/XLPagerTabStrip/Demo/ButtonBarExampleViewController.m +++ b/XLPagerTabStrip/Demo/ButtonBarExampleViewController.m @@ -2,7 +2,7 @@ // ButtonContainerViewController.m // XLPagerTabStrip ( https://github.com/xmartlabs/XLPagerTabStrip ) // -// Copyright (c) 2014 Xmartlabs ( http://xmartlabs.com ) +// Copyright (c) 2015 Xmartlabs ( http://xmartlabs.com ) // // // Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/XLPagerTabStrip/Demo/ChildViewController/ChildExampleViewController.h b/XLPagerTabStrip/Demo/ChildViewController/ChildExampleViewController.h index 4381d33..5e589fd 100644 --- a/XLPagerTabStrip/Demo/ChildViewController/ChildExampleViewController.h +++ b/XLPagerTabStrip/Demo/ChildViewController/ChildExampleViewController.h @@ -2,7 +2,7 @@ // ChildExampleViewController.h // XLPagerTabStrip ( https://github.com/xmartlabs/XLPagerTabStrip ) // -// Copyright (c) 2014 Xmartlabs ( http://xmartlabs.com ) +// Copyright (c) 2015 Xmartlabs ( http://xmartlabs.com ) // // // Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/XLPagerTabStrip/Demo/ChildViewController/ChildExampleViewController.m b/XLPagerTabStrip/Demo/ChildViewController/ChildExampleViewController.m index d542d05..3dccc25 100644 --- a/XLPagerTabStrip/Demo/ChildViewController/ChildExampleViewController.m +++ b/XLPagerTabStrip/Demo/ChildViewController/ChildExampleViewController.m @@ -2,7 +2,7 @@ // ChildExampleViewController.m // XLPagerTabStrip ( https://github.com/xmartlabs/XLPagerTabStrip ) // -// Copyright (c) 2014 Xmartlabs ( http://xmartlabs.com ) +// Copyright (c) 2015 Xmartlabs ( http://xmartlabs.com ) // // // Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/XLPagerTabStrip/Demo/ChildViewController/TableChildExampleViewController.h b/XLPagerTabStrip/Demo/ChildViewController/TableChildExampleViewController.h index 4330785..4c5b855 100644 --- a/XLPagerTabStrip/Demo/ChildViewController/TableChildExampleViewController.h +++ b/XLPagerTabStrip/Demo/ChildViewController/TableChildExampleViewController.h @@ -2,7 +2,7 @@ // TableChildExampleViewController.h // XLPagerTabStrip ( https://github.com/xmartlabs/XLPagerTabStrip ) // -// Copyright (c) 2014 Xmartlabs ( http://xmartlabs.com ) +// Copyright (c) 2015 Xmartlabs ( http://xmartlabs.com ) // // // Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/XLPagerTabStrip/Demo/ChildViewController/TableChildExampleViewController.m b/XLPagerTabStrip/Demo/ChildViewController/TableChildExampleViewController.m index f8dde93..654d388 100644 --- a/XLPagerTabStrip/Demo/ChildViewController/TableChildExampleViewController.m +++ b/XLPagerTabStrip/Demo/ChildViewController/TableChildExampleViewController.m @@ -2,7 +2,7 @@ // TableChildExampleViewController.m // XLPagerTabStrip ( https://github.com/xmartlabs/XLPagerTabStrip ) // -// Copyright (c) 2014 Xmartlabs ( http://xmartlabs.com ) +// Copyright (c) 2015 Xmartlabs ( http://xmartlabs.com ) // // // Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/XLPagerTabStrip/Demo/ChildViewController/Views/PostCell.h b/XLPagerTabStrip/Demo/ChildViewController/Views/PostCell.h index 1ec2841..81194dd 100644 --- a/XLPagerTabStrip/Demo/ChildViewController/Views/PostCell.h +++ b/XLPagerTabStrip/Demo/ChildViewController/Views/PostCell.h @@ -2,7 +2,7 @@ // PostCell.h // XLPagerTabStrip ( https://github.com/xmartlabs/XLPagerTabStrip ) // -// Copyright (c) 2014 Xmartlabs ( http://xmartlabs.com ) +// Copyright (c) 2015 Xmartlabs ( http://xmartlabs.com ) // // // Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/XLPagerTabStrip/Demo/ChildViewController/Views/PostCell.m b/XLPagerTabStrip/Demo/ChildViewController/Views/PostCell.m index 1286fdc..c840724 100644 --- a/XLPagerTabStrip/Demo/ChildViewController/Views/PostCell.m +++ b/XLPagerTabStrip/Demo/ChildViewController/Views/PostCell.m @@ -2,7 +2,7 @@ // PostCell.m // XLPagerTabStrip ( https://github.com/xmartlabs/XLPagerTabStrip ) // -// Copyright (c) 2014 Xmartlabs ( http://xmartlabs.com ) +// Copyright (c) 2015 Xmartlabs ( http://xmartlabs.com ) // // // Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/XLPagerTabStrip/Demo/Helpers/ReloadExampleViewController.h b/XLPagerTabStrip/Demo/Helpers/ReloadExampleViewController.h index 2556b4a..eccb965 100644 --- a/XLPagerTabStrip/Demo/Helpers/ReloadExampleViewController.h +++ b/XLPagerTabStrip/Demo/Helpers/ReloadExampleViewController.h @@ -3,7 +3,7 @@ // XLPagerTabStrip // // Created by Martin Barreto on 12/20/14. -// Copyright (c) 2014 Xmartlabs. All rights reserved. +// Copyright (c) 2015 Xmartlabs. All rights reserved. // #import diff --git a/XLPagerTabStrip/Demo/Helpers/ReloadExampleViewController.m b/XLPagerTabStrip/Demo/Helpers/ReloadExampleViewController.m index 8765bf5..ba9144d 100644 --- a/XLPagerTabStrip/Demo/Helpers/ReloadExampleViewController.m +++ b/XLPagerTabStrip/Demo/Helpers/ReloadExampleViewController.m @@ -3,7 +3,7 @@ // XLPagerTabStrip // // Created by Martin Barreto on 12/20/14. -// Copyright (c) 2014 Xmartlabs. All rights reserved. +// Copyright (c) 2015 Xmartlabs. All rights reserved. // #import "XLPagerTabStripViewController.h" #import "ReloadExampleViewController.h" @@ -51,19 +51,15 @@ -(void)updateTitle:(XLPagerTabStripViewController *)pagerController { - NSString * title = @"isProgressiveIndicator = NO"; - if (pagerController.isProgressiveIndicator){ - if (pagerController.isElasticIndicatorLimit){ - title = @"isProgressiveIndicator = YES, isElasticIndicatorLimit = YES"; - } - else{ - title = @"isProgressiveIndicator = YES, isElasticIndicatorLimit = NO"; - } - } - + NSString * title = [NSString stringWithFormat:@"Progressive = %@ ElasticLimit = %@",[self stringFromBool:pagerController.isProgressiveIndicator] ,[self stringFromBool:pagerController.isElasticIndicatorLimit]]; self.titleLabel.text = title; ((UILabel *)self.navigationItem.titleView).text = title; [((UILabel *)self.navigationItem.titleView) sizeToFit]; } +-(NSString *)stringFromBool:(BOOL)value +{ + return value ? @"YES" : @"NO"; +} + @end diff --git a/XLPagerTabStrip/Demo/Helpers/XLJSONSerialization.h b/XLPagerTabStrip/Demo/Helpers/XLJSONSerialization.h index 844a595..78b5b4e 100644 --- a/XLPagerTabStrip/Demo/Helpers/XLJSONSerialization.h +++ b/XLPagerTabStrip/Demo/Helpers/XLJSONSerialization.h @@ -2,7 +2,7 @@ // XLJSONSerialization.h // XLPagerTabStrip ( https://github.com/xmartlabs/XLPagerTabStrip ) // -// Copyright (c) 2014 Xmartlabs ( http://xmartlabs.com ) +// Copyright (c) 2015 Xmartlabs ( http://xmartlabs.com ) // // // Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/XLPagerTabStrip/Demo/Helpers/XLJSONSerialization.m b/XLPagerTabStrip/Demo/Helpers/XLJSONSerialization.m index 9b312b5..76201c2 100644 --- a/XLPagerTabStrip/Demo/Helpers/XLJSONSerialization.m +++ b/XLPagerTabStrip/Demo/Helpers/XLJSONSerialization.m @@ -2,7 +2,7 @@ // XLJSONSerialization.m // XLPagerTabStrip ( https://github.com/xmartlabs/XLPagerTabStrip ) // -// Copyright (c) 2014 Xmartlabs ( http://xmartlabs.com ) +// Copyright (c) 2015 Xmartlabs ( http://xmartlabs.com ) // // // Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/XLPagerTabStrip/Demo/SegmentedExampleViewController.h b/XLPagerTabStrip/Demo/SegmentedExampleViewController.h index 1637cd5..095c294 100644 --- a/XLPagerTabStrip/Demo/SegmentedExampleViewController.h +++ b/XLPagerTabStrip/Demo/SegmentedExampleViewController.h @@ -2,7 +2,7 @@ // SegmentedContainerViewController.h // XLPagerTabStrip ( https://github.com/xmartlabs/XLPagerTabStrip ) // -// Copyright (c) 2014 Xmartlabs ( http://xmartlabs.com ) +// Copyright (c) 2015 Xmartlabs ( http://xmartlabs.com ) // // // Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/XLPagerTabStrip/Demo/SegmentedExampleViewController.m b/XLPagerTabStrip/Demo/SegmentedExampleViewController.m index 5db0d9c..0152102 100644 --- a/XLPagerTabStrip/Demo/SegmentedExampleViewController.m +++ b/XLPagerTabStrip/Demo/SegmentedExampleViewController.m @@ -2,7 +2,7 @@ // SegmentedContainerViewController.m // XLPagerTabStrip ( https://github.com/xmartlabs/XLPagerTabStrip ) // -// Copyright (c) 2014 Xmartlabs ( http://xmartlabs.com ) +// Copyright (c) 2015 Xmartlabs ( http://xmartlabs.com ) // // // Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/XLPagerTabStrip/Demo/Storyboard.storyboard b/XLPagerTabStrip/Demo/Storyboard.storyboard index 688ae69..3025f98 100644 --- a/XLPagerTabStrip/Demo/Storyboard.storyboard +++ b/XLPagerTabStrip/Demo/Storyboard.storyboard @@ -1,7 +1,8 @@ - + - + + @@ -14,12 +15,12 @@ - + - + @@ -56,9 +57,9 @@ - + - + @@ -87,8 +88,8 @@ @@ -119,7 +120,9 @@ - + + + @@ -127,7 +130,7 @@ - + @@ -167,7 +170,7 @@ - + @@ -190,7 +193,7 @@ - + @@ -212,7 +215,7 @@ - + @@ -228,17 +231,20 @@ + - + - + - + + + @@ -247,24 +253,27 @@ - + - + - + - + + + + @@ -275,7 +284,7 @@ - + @@ -330,7 +339,7 @@ - + @@ -352,7 +361,75 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/XLPagerTabStrip/Demo/TwitterExampleViewController.h b/XLPagerTabStrip/Demo/TwitterExampleViewController.h new file mode 100644 index 0000000..aef93b3 --- /dev/null +++ b/XLPagerTabStrip/Demo/TwitterExampleViewController.h @@ -0,0 +1,13 @@ +// +// TwitterExampleViewController.h +// XLPagerTabStrip +// +// Created by Archibald on 4/7/15. +// Copyright (c) 2015 Xmartlabs. All rights reserved. +// + +#import "XLTwitterPagerTabStripViewController.h" + +@interface TwitterExampleViewController : XLTwitterPagerTabStripViewController + +@end diff --git a/XLPagerTabStrip/Demo/TwitterExampleViewController.m b/XLPagerTabStrip/Demo/TwitterExampleViewController.m new file mode 100644 index 0000000..a0f00d5 --- /dev/null +++ b/XLPagerTabStrip/Demo/TwitterExampleViewController.m @@ -0,0 +1,61 @@ +// +// TwitterExampleViewController.m +// XLPagerTabStrip +// +// Created by Archibald on 4/7/15. +// Copyright (c) 2015 Xmartlabs. All rights reserved. +// + +#import "TableChildExampleViewController.h" +#import "ChildExampleViewController.h" +#import "TwitterExampleViewController.h" + +@implementation TwitterExampleViewController +{ + BOOL _isReload; +} + +- (void)viewDidLoad { + [super viewDidLoad]; + _isReload = NO; + self.isProgressiveIndicator = YES; + self.isElasticIndicatorLimit = YES; + // Do any additional setup after loading the view. +} + + +#pragma mark - XLPagerTabStripViewControllerDataSource + +-(NSArray *)childViewControllersForPagerTabStripViewController:(XLPagerTabStripViewController *)pagerTabStripViewController +{ + // create child view controllers that will be managed by XLPagerTabStripViewController + TableChildExampleViewController * child_1 = [[TableChildExampleViewController alloc] initWithStyle:UITableViewStylePlain]; + ChildExampleViewController * child_2 = [[ChildExampleViewController alloc] init]; + TableChildExampleViewController * child_3 = [[TableChildExampleViewController alloc] initWithStyle:UITableViewStyleGrouped]; + ChildExampleViewController * child_4 = [[ChildExampleViewController alloc] init]; + TableChildExampleViewController * child_5 = [[TableChildExampleViewController alloc] initWithStyle:UITableViewStylePlain]; + ChildExampleViewController * child_6 = [[ChildExampleViewController alloc] init]; + TableChildExampleViewController * child_7 = [[TableChildExampleViewController alloc] initWithStyle:UITableViewStyleGrouped]; + ChildExampleViewController * child_8 = [[ChildExampleViewController alloc] init]; + if (!_isReload){ + return @[child_1, child_2, child_3, child_4, child_5, child_6, child_7, child_8]; + } + + NSMutableArray * childViewControllers = [NSMutableArray arrayWithObjects:child_1, child_2, child_3, child_4, child_5, child_6, child_7, child_8, nil]; + NSUInteger count = [childViewControllers count]; + for (NSUInteger i = 0; i < count; ++i) { + // Select a random element between i and end of array to swap with. + NSUInteger nElements = count - i; + NSUInteger n = (arc4random() % nElements) + i; + [childViewControllers exchangeObjectAtIndex:i withObjectAtIndex:n]; + } + NSUInteger nItems = 1 + (rand() % 8); + return [childViewControllers subarrayWithRange:NSMakeRange(0, nItems)]; +} + +- (IBAction)reloadTapped:(id)sender { + _isReload = YES; + [self reloadPagerTabStripView]; +} + +@end diff --git a/XLPagerTabStrip/FXPageControl/FXPageControl.h b/XLPagerTabStrip/FXPageControl/FXPageControl.h new file mode 100755 index 0000000..37a0438 --- /dev/null +++ b/XLPagerTabStrip/FXPageControl/FXPageControl.h @@ -0,0 +1,106 @@ +// +// FXPageControl.h +// +// Version 1.4 +// +// Created by Nick Lockwood on 07/01/2010. +// Copyright 2010 Charcoal Design +// +// Distributed under the permissive zlib License +// Get the latest version of FXPageControl from here: +// +// https://github.com/nicklockwood/FXPageControl +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// +// 3. This notice may not be removed or altered from any source distribution. +// + + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wobjc-missing-property-synthesis" +#import + + +#import +#undef weak_delegate +#if __has_feature(objc_arc_weak) +#define weak_delegate weak +#else +#define weak_delegate unsafe_unretained +#endif + + +extern const CGPathRef FXPageControlDotShapeCircle; +extern const CGPathRef FXPageControlDotShapeSquare; +extern const CGPathRef FXPageControlDotShapeTriangle; + + +@protocol FXPageControlDelegate; + + +IB_DESIGNABLE @interface FXPageControl : UIControl + +- (void)setUp; +- (CGSize)sizeForNumberOfPages:(NSInteger)pageCount; +- (void)updateCurrentPageDisplay; + +@property (nonatomic, weak_delegate) IBOutlet id delegate; + +@property (nonatomic, assign) IBInspectable NSInteger currentPage; +@property (nonatomic, assign) IBInspectable NSInteger numberOfPages; +@property (nonatomic, assign) IBInspectable BOOL defersCurrentPageDisplay; +@property (nonatomic, assign) IBInspectable BOOL hidesForSinglePage; +@property (nonatomic, assign, getter = isWrapEnabled) IBInspectable BOOL wrapEnabled; +@property (nonatomic, assign, getter = isVertical) IBInspectable BOOL vertical; + +@property (nonatomic, strong) IBInspectable UIImage *dotImage; +@property (nonatomic, assign) IBInspectable CGPathRef dotShape; +@property (nonatomic, assign) IBInspectable CGFloat dotSize; +@property (nonatomic, strong) IBInspectable UIColor *dotColor; +@property (nonatomic, strong) IBInspectable UIColor *dotShadowColor; +@property (nonatomic, assign) IBInspectable CGFloat dotShadowBlur; +@property (nonatomic, assign) IBInspectable CGSize dotShadowOffset; + +@property (nonatomic, strong) IBInspectable UIImage *selectedDotImage; +@property (nonatomic, assign) IBInspectable CGPathRef selectedDotShape; +@property (nonatomic, assign) IBInspectable CGFloat selectedDotSize; +@property (nonatomic, strong) IBInspectable UIColor *selectedDotColor; +@property (nonatomic, strong) IBInspectable UIColor *selectedDotShadowColor; +@property (nonatomic, assign) IBInspectable CGFloat selectedDotShadowBlur; +@property (nonatomic, assign) IBInspectable CGSize selectedDotShadowOffset; + +@property (nonatomic, assign) IBInspectable CGFloat dotSpacing; + +@end + + +@protocol FXPageControlDelegate +@optional + +- (UIImage *)pageControl:(FXPageControl *)pageControl imageForDotAtIndex:(NSInteger)index; +- (CGPathRef)pageControl:(FXPageControl *)pageControl shapeForDotAtIndex:(NSInteger)index; +- (UIColor *)pageControl:(FXPageControl *)pageControl colorForDotAtIndex:(NSInteger)index; + +- (UIImage *)pageControl:(FXPageControl *)pageControl selectedImageForDotAtIndex:(NSInteger)index; +- (CGPathRef)pageControl:(FXPageControl *)pageControl selectedShapeForDotAtIndex:(NSInteger)index; +- (UIColor *)pageControl:(FXPageControl *)pageControl selectedColorForDotAtIndex:(NSInteger)index; + +@end + + +#pragma GCC diagnostic pop diff --git a/XLPagerTabStrip/FXPageControl/FXPageControl.m b/XLPagerTabStrip/FXPageControl/FXPageControl.m new file mode 100755 index 0000000..338eb19 --- /dev/null +++ b/XLPagerTabStrip/FXPageControl/FXPageControl.m @@ -0,0 +1,433 @@ +// +// FXPageControl.m +// +// Version 1.4 +// +// Created by Nick Lockwood on 07/01/2010. +// Copyright 2010 Charcoal Design +// +// Distributed under the permissive zlib License +// Get the latest version of FXPageControl from here: +// +// https://github.com/nicklockwood/FXPageControl +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// +// 3. This notice may not be removed or altered from any source distribution. +// + +#import "FXPageControl.h" + + +#pragma GCC diagnostic ignored "-Wgnu" +#pragma GCC diagnostic ignored "-Wreceiver-is-weak" +#pragma GCC diagnostic ignored "-Warc-repeated-use-of-weak" +#pragma GCC diagnostic ignored "-Wdirect-ivar-access" + + +#import +#if !__has_feature(objc_arc) +#error This class requires automatic reference counting +#endif + + +const CGPathRef FXPageControlDotShapeCircle = (const CGPathRef)1; +const CGPathRef FXPageControlDotShapeSquare = (const CGPathRef)2; +const CGPathRef FXPageControlDotShapeTriangle = (const CGPathRef)3; +#define LAST_SHAPE FXPageControlDotShapeTriangle + + +@implementation NSObject (FXPageControl) + +- (UIImage *)pageControl:(__unused FXPageControl *)pageControl imageForDotAtIndex:(__unused NSInteger)index { return nil; } +- (CGPathRef)pageControl:(__unused FXPageControl *)pageControl shapeForDotAtIndex:(__unused NSInteger)index { return NULL; } +- (UIColor *)pageControl:(__unused FXPageControl *)pageControl colorForDotAtIndex:(__unused NSInteger)index { return nil; } + +- (UIImage *)pageControl:(__unused FXPageControl *)pageControl selectedImageForDotAtIndex:(__unused NSInteger)index { return nil; } +- (CGPathRef)pageControl:(__unused FXPageControl *)pageControl selectedShapeForDotAtIndex:(__unused NSInteger)index { return NULL; } +- (UIColor *)pageControl:(__unused FXPageControl *)pageControl selectedColorForDotAtIndex:(__unused NSInteger)index { return nil; } + +@end + + +@implementation FXPageControl + +- (void)setUp +{ + //needs redrawing if bounds change + self.contentMode = UIViewContentModeRedraw; + + //set defaults + _dotSpacing = 10.0f; + _dotSize = 6.0f; + _dotShadowOffset = CGSizeMake(0, 1); + _selectedDotShadowOffset = CGSizeMake(0, 1); +} + +- (id)initWithFrame:(CGRect)frame +{ + if ((self = [super initWithFrame:frame])) + { + [self setUp]; + } + return self; +} + +- (id)initWithCoder:(NSCoder *)aDecoder +{ + if ((self = [super initWithCoder:aDecoder])) + { + [self setUp]; + } + return self; +} + +- (void)dealloc +{ + if (_dotShape > LAST_SHAPE) CGPathRelease(_dotShape); + if (_selectedDotShape > LAST_SHAPE) CGPathRelease(_selectedDotShape); +} + +- (CGSize)sizeForNumberOfPages:(__unused NSInteger)pageCount +{ + CGFloat width = _dotSize + (_dotSize + _dotSpacing) * (_numberOfPages - 1); + return _vertical? CGSizeMake(_dotSize, width): CGSizeMake(width, _dotSize); +} + +- (void)updateCurrentPageDisplay +{ + [self setNeedsDisplay]; +} + +- (void)drawRect:(__unused CGRect)rect +{ + if (_numberOfPages > 1 || !_hidesForSinglePage) + { + CGContextRef context = UIGraphicsGetCurrentContext(); + CGSize size = [self sizeForNumberOfPages:_numberOfPages]; + if (_vertical) + { + CGContextTranslateCTM(context, self.frame.size.width / 2, (self.frame.size.height - size.height) / 2); + } + else + { + CGContextTranslateCTM(context, (self.frame.size.width - size.width) / 2, self.frame.size.height / 2); + } + + for (int i = 0; i < _numberOfPages; i++) + { + UIImage *dotImage = nil; + UIColor *dotColor = nil; + CGPathRef dotShape = NULL; + CGFloat dotSize = 0; + UIColor *dotShadowColor = nil; + CGSize dotShadowOffset = CGSizeZero; + CGFloat dotShadowBlur = 0; + + if (i == _currentPage) + { + [_selectedDotColor setFill]; + dotImage = [_delegate pageControl:self selectedImageForDotAtIndex:i] ?: _selectedDotImage; + dotShape = [_delegate pageControl:self selectedShapeForDotAtIndex:i] ?: _selectedDotShape ?: _dotShape; + dotColor = [_delegate pageControl:self selectedColorForDotAtIndex:i] ?: _selectedDotColor ?: [UIColor blackColor]; + dotShadowBlur = _selectedDotShadowBlur; + dotShadowColor = _selectedDotShadowColor; + dotShadowOffset = _selectedDotShadowOffset; + dotSize = _selectedDotSize ?: _dotSize; + } + else + { + [_dotColor setFill]; + dotImage = [_delegate pageControl:self imageForDotAtIndex:i] ?: _dotImage; + dotShape = [_delegate pageControl:self shapeForDotAtIndex:i] ?: _dotShape; + dotColor = [_delegate pageControl:self colorForDotAtIndex:i] ?: _dotColor; + if (!dotColor) + { + //fall back to selected dot color with reduced alpha + dotColor = [_delegate pageControl:self selectedColorForDotAtIndex:i] ?: _selectedDotColor ?: [UIColor blackColor]; + dotColor = [dotColor colorWithAlphaComponent:0.25f]; + } + dotShadowBlur = _dotShadowBlur; + dotShadowColor = _dotShadowColor; + dotShadowOffset = _dotShadowOffset; + dotSize = _dotSize; + } + + CGContextSaveGState(context); + CGFloat offset = (_dotSize + _dotSpacing) * i + _dotSize / 2; + CGContextTranslateCTM(context, _vertical? 0: offset, _vertical? offset: 0); + + if (dotShadowColor && ![dotShadowColor isEqual:[UIColor clearColor]]) + { + CGContextSetShadowWithColor(context, dotShadowOffset, dotShadowBlur, dotShadowColor.CGColor); + } + if (dotImage) + { + [dotImage drawInRect:CGRectMake(-dotImage.size.width / 2, -dotImage.size.height / 2, dotImage.size.width, dotImage.size.height)]; + } + else + { + [dotColor setFill]; + if (!dotShape || dotShape == FXPageControlDotShapeCircle) + { + CGContextFillEllipseInRect(context, CGRectMake(-dotSize / 2, -dotSize / 2, dotSize, dotSize)); + } + else if (dotShape == FXPageControlDotShapeSquare) + { + CGContextFillRect(context, CGRectMake(-dotSize / 2, -dotSize / 2, dotSize, dotSize)); + } + else if (dotShape == FXPageControlDotShapeTriangle) + { + CGContextBeginPath(context); + CGContextMoveToPoint(context, 0, -dotSize / 2); + CGContextAddLineToPoint(context, dotSize / 2, dotSize / 2); + CGContextAddLineToPoint(context, -dotSize / 2, dotSize / 2); + CGContextAddLineToPoint(context, 0, -dotSize / 2); + CGContextFillPath(context); + } + else + { + CGContextBeginPath(context); + CGContextAddPath(context, dotShape); + CGContextFillPath(context); + } + } + CGContextRestoreGState(context); + } + } +} + +- (NSInteger)clampedPageValue:(NSInteger)page +{ + if (_wrapEnabled) + { + return _numberOfPages? (page + _numberOfPages) % _numberOfPages: 0; + } + else + { + return MIN(MAX(0, page), _numberOfPages - 1); + } +} + +- (void)setDotImage:(UIImage *)dotImage +{ + if (_dotImage != dotImage) + { + _dotImage = dotImage; + [self setNeedsDisplay]; + } +} + +- (void)setDotShape:(CGPathRef)dotShape +{ + if (_dotShape != dotShape) + { + if (_dotShape > LAST_SHAPE) CGPathRelease(_dotShape); + _dotShape = dotShape; + if (_dotShape > LAST_SHAPE) CGPathRetain(_dotShape); + [self setNeedsDisplay]; + } +} + +- (void)setDotSize:(CGFloat)dotSize +{ + if (ABS(_dotSize - dotSize) > 0.001) + { + _dotSize = dotSize; + [self setNeedsDisplay]; + } +} + +- (void)setDotColor:(UIColor *)dotColor +{ + if (_dotColor != dotColor) + { + _dotColor = dotColor; + [self setNeedsDisplay]; + } +} + +- (void)setDotShadowColor:(UIColor *)dotColor +{ + if (_dotShadowColor != dotColor) + { + _dotShadowColor = dotColor; + [self setNeedsDisplay]; + } +} + +- (void)setDotShadowBlur:(CGFloat)dotShadowBlur +{ + if (ABS(_dotShadowBlur - dotShadowBlur) > 0.001) + { + _dotShadowBlur = dotShadowBlur; + [self setNeedsDisplay]; + } +} + +- (void)setDotShadowOffset:(CGSize)dotShadowOffset +{ + if (!CGSizeEqualToSize(_dotShadowOffset, dotShadowOffset)) + { + _dotShadowOffset = dotShadowOffset; + [self setNeedsDisplay]; + } +} + +- (void)setSelectedDotImage:(UIImage *)dotImage +{ + if (_selectedDotImage != dotImage) + { + _selectedDotImage = dotImage; + [self setNeedsDisplay]; + } +} + +- (void)setSelectedDotColor:(UIColor *)dotColor +{ + if (_selectedDotColor != dotColor) + { + _selectedDotColor = dotColor; + [self setNeedsDisplay]; + } +} + +- (void)setSelectedDotShape:(CGPathRef)dotShape +{ + if (_selectedDotShape != dotShape) + { + if (_selectedDotShape > LAST_SHAPE) CGPathRelease(_selectedDotShape); + _selectedDotShape = dotShape; + if (_selectedDotShape > LAST_SHAPE) CGPathRetain(_selectedDotShape); + [self setNeedsDisplay]; + } +} + +- (void)setSelectedDotSize:(CGFloat)dotSize +{ + if (ABS(_selectedDotSize - dotSize) > 0.001) + { + _selectedDotSize = dotSize; + [self setNeedsDisplay]; + } +} + +- (void)setSelectedDotShadowColor:(UIColor *)dotColor +{ + if (_selectedDotShadowColor != dotColor) + { + _selectedDotShadowColor = dotColor; + [self setNeedsDisplay]; + } +} + +- (void)setSelectedDotShadowBlur:(CGFloat)dotShadowBlur +{ + if (ABS(_selectedDotShadowBlur - dotShadowBlur) > 0.001) + { + _selectedDotShadowBlur = dotShadowBlur; + [self setNeedsDisplay]; + } +} + +- (void)setSelectedDotShadowOffset:(CGSize)dotShadowOffset +{ + if (!CGSizeEqualToSize(_selectedDotShadowOffset, dotShadowOffset)) + { + _selectedDotShadowOffset = dotShadowOffset; + [self setNeedsDisplay]; + } +} + +- (void)setDotSpacing:(CGFloat)dotSpacing +{ + if (ABS(_dotSpacing - dotSpacing) > 0.001) + { + _dotSpacing = dotSpacing; + [self setNeedsDisplay]; + } +} + +- (void)setDelegate:(id)delegate +{ + if (_delegate != delegate) + { + _delegate = delegate; + [self setNeedsDisplay]; + } +} + +- (void)setCurrentPage:(NSInteger)page +{ + _currentPage = [self clampedPageValue:page]; + [self setNeedsDisplay]; +} + +- (void)setNumberOfPages:(NSInteger)pages +{ + if (_numberOfPages != pages) + { + _numberOfPages = pages; + if (_currentPage >= pages) + { + _currentPage = pages - 1; + } + [self setNeedsDisplay]; + } +} + +- (void)endTrackingWithTouch:(UITouch *)touch withEvent:(UIEvent *)event +{ + CGPoint point = [touch locationInView:self]; + BOOL forward = _vertical? (point.y > self.frame.size.height / 2): (point.x > self.frame.size.width / 2); + _currentPage = [self clampedPageValue:_currentPage + (forward? 1: -1)]; + if (!_defersCurrentPageDisplay) + { + [self setNeedsDisplay]; + } + [self sendActionsForControlEvents:UIControlEventValueChanged]; + [super endTrackingWithTouch:touch withEvent:event]; +} + +- (CGSize)sizeThatFits:(__unused CGSize)size +{ + CGSize dotSize = [self sizeForNumberOfPages:_numberOfPages]; + if (_selectedDotSize) + { + CGFloat width = (_selectedDotSize - _dotSize); + CGFloat height = MAX(36, MAX(_dotSize, _selectedDotSize)); + dotSize.width = _vertical? height: dotSize.width + width; + dotSize.height = _vertical? dotSize.height + width: height; + + } + if ((_dotShadowColor && ![_dotShadowColor isEqual:[UIColor clearColor]]) || + (_selectedDotShadowColor && ![_selectedDotShadowColor isEqual:[UIColor clearColor]])) + { + dotSize.width += MAX(_dotShadowOffset.width, _selectedDotShadowOffset.width) * 2; + dotSize.height += MAX(_dotShadowOffset.height, _selectedDotShadowOffset.height) * 2; + dotSize.width += MAX(_dotShadowBlur, _selectedDotShadowBlur) * 2; + dotSize.height += MAX(_dotShadowBlur, _selectedDotShadowBlur) * 2; + } + return dotSize; +} + +- (CGSize)intrinsicContentSize +{ + return [self sizeThatFits:self.bounds.size]; +} + +@end diff --git a/XLPagerTabStrip/Images.xcassets/logoCircle.imageset/Contents.json b/XLPagerTabStrip/Images.xcassets/logoCircle.imageset/Contents.json new file mode 100644 index 0000000..bed9e55 --- /dev/null +++ b/XLPagerTabStrip/Images.xcassets/logoCircle.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x", + "filename" : "xmartlabsLogo1.png" + }, + { + "idiom" : "universal", + "scale" : "2x", + "filename" : "xmartlabsLogo.png" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/XLPagerTabStrip/Images.xcassets/logoCircle.imageset/xmartlabsLogo.png b/XLPagerTabStrip/Images.xcassets/logoCircle.imageset/xmartlabsLogo.png new file mode 100644 index 0000000..a41e63c Binary files /dev/null and b/XLPagerTabStrip/Images.xcassets/logoCircle.imageset/xmartlabsLogo.png differ diff --git a/XLPagerTabStrip/Images.xcassets/logoCircle.imageset/xmartlabsLogo1.png b/XLPagerTabStrip/Images.xcassets/logoCircle.imageset/xmartlabsLogo1.png new file mode 100644 index 0000000..b345500 Binary files /dev/null and b/XLPagerTabStrip/Images.xcassets/logoCircle.imageset/xmartlabsLogo1.png differ diff --git a/XLPagerTabStrip/XL/.DS_Store b/XLPagerTabStrip/XL/.DS_Store new file mode 100644 index 0000000..ed1710a Binary files /dev/null and b/XLPagerTabStrip/XL/.DS_Store differ diff --git a/XLPagerTabStrip/XL/Controllers/.DS_Store b/XLPagerTabStrip/XL/Controllers/.DS_Store new file mode 100644 index 0000000..49dd3d1 Binary files /dev/null and b/XLPagerTabStrip/XL/Controllers/.DS_Store differ diff --git a/XLPagerTabStrip/XL/Controllers/XLBarPagerTabStripViewController.h b/XLPagerTabStrip/XL/Controllers/XLBarPagerTabStripViewController.h index 22f9756..3937a06 100644 --- a/XLPagerTabStrip/XL/Controllers/XLBarPagerTabStripViewController.h +++ b/XLPagerTabStrip/XL/Controllers/XLBarPagerTabStripViewController.h @@ -2,7 +2,7 @@ // XLBarPagerTabStripViewController.h // XLPagerTabStrip ( https://github.com/xmartlabs/XLPagerTabStrip ) // -// Copyright (c) 2014 Xmartlabs ( http://xmartlabs.com ) +// Copyright (c) 2015 Xmartlabs ( http://xmartlabs.com ) // // // Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/XLPagerTabStrip/XL/Controllers/XLBarPagerTabStripViewController.m b/XLPagerTabStrip/XL/Controllers/XLBarPagerTabStripViewController.m index 605ee36..ddaca23 100644 --- a/XLPagerTabStrip/XL/Controllers/XLBarPagerTabStripViewController.m +++ b/XLPagerTabStrip/XL/Controllers/XLBarPagerTabStripViewController.m @@ -2,7 +2,7 @@ // XLBarPagerTabStripViewController.m // XLPagerTabStrip ( https://github.com/xmartlabs/XLPagerTabStrip ) // -// Copyright (c) 2014 Xmartlabs ( http://xmartlabs.com ) +// Copyright (c) 2015 Xmartlabs ( http://xmartlabs.com ) // // // Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/XLPagerTabStrip/XL/Controllers/XLButtonBarPagerTabStripViewController.h b/XLPagerTabStrip/XL/Controllers/XLButtonBarPagerTabStripViewController.h index e917343..c276864 100644 --- a/XLPagerTabStrip/XL/Controllers/XLButtonBarPagerTabStripViewController.h +++ b/XLPagerTabStrip/XL/Controllers/XLButtonBarPagerTabStripViewController.h @@ -2,7 +2,7 @@ // XLButtonBarPagerTabStripViewController.h // XLPagerTabStrip ( https://github.com/xmartlabs/XLPagerTabStrip ) // -// Copyright (c) 2014 Xmartlabs ( http://xmartlabs.com ) +// Copyright (c) 2015 Xmartlabs ( http://xmartlabs.com ) // // // Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/XLPagerTabStrip/XL/Controllers/XLButtonBarPagerTabStripViewController.m b/XLPagerTabStrip/XL/Controllers/XLButtonBarPagerTabStripViewController.m index c9352f2..6cef832 100644 --- a/XLPagerTabStrip/XL/Controllers/XLButtonBarPagerTabStripViewController.m +++ b/XLPagerTabStrip/XL/Controllers/XLButtonBarPagerTabStripViewController.m @@ -2,7 +2,7 @@ // XLButtonBarPagerTabStripViewController.m // XLPagerTabStrip ( https://github.com/xmartlabs/XLPagerTabStrip ) // -// Copyright (c) 2014 Xmartlabs ( http://xmartlabs.com ) +// Copyright (c) 2015 Xmartlabs ( http://xmartlabs.com ) // // // Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/XLPagerTabStrip/XL/Controllers/XLPagerTabStripViewController.h b/XLPagerTabStrip/XL/Controllers/XLPagerTabStripViewController.h index f9cda12..c1c8bd0 100644 --- a/XLPagerTabStrip/XL/Controllers/XLPagerTabStripViewController.h +++ b/XLPagerTabStrip/XL/Controllers/XLPagerTabStripViewController.h @@ -2,7 +2,7 @@ // XLPagerTabStripViewController.h // XLPagerTabStrip ( https://github.com/xmartlabs/XLPagerTabStrip ) // -// Copyright (c) 2014 Xmartlabs ( http://xmartlabs.com ) +// Copyright (c) 2015 Xmartlabs ( http://xmartlabs.com ) // // // Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/XLPagerTabStrip/XL/Controllers/XLPagerTabStripViewController.m b/XLPagerTabStrip/XL/Controllers/XLPagerTabStripViewController.m index c5e81f5..2cef2e5 100644 --- a/XLPagerTabStrip/XL/Controllers/XLPagerTabStripViewController.m +++ b/XLPagerTabStrip/XL/Controllers/XLPagerTabStripViewController.m @@ -2,7 +2,7 @@ // XLPagerTabStripViewController // XLPagerTabStrip ( https://github.com/xmartlabs/XLPagerTabStrip ) // -// Copyright (c) 2014 Xmartlabs ( http://xmartlabs.com ) +// Copyright (c) 2015 Xmartlabs ( http://xmartlabs.com ) // // // Permission is hereby granted, free of charge, to any person obtaining a copy @@ -156,12 +156,14 @@ -(void)pagerTabStripViewController:(XLPagerTabStripViewController *)pagerTabStripViewController updateIndicatorFromIndex:(NSInteger)fromIndex toIndex:(NSInteger)toIndex{ + } -(void)pagerTabStripViewController:(XLPagerTabStripViewController *)pagerTabStripViewController updateIndicatorFromIndex:(NSInteger)fromIndex toIndex:(NSInteger)toIndex - withProgressPercentage:(CGFloat)progressPercentage{ + withProgressPercentage:(CGFloat)progressPercentage +{ } diff --git a/XLPagerTabStrip/XL/Controllers/XLSegmentedPagerTabStripViewController.h b/XLPagerTabStrip/XL/Controllers/XLSegmentedPagerTabStripViewController.h index 01e2f61..60618e7 100644 --- a/XLPagerTabStrip/XL/Controllers/XLSegmentedPagerTabStripViewController.h +++ b/XLPagerTabStrip/XL/Controllers/XLSegmentedPagerTabStripViewController.h @@ -2,7 +2,7 @@ // XLSegmentedPagerTabStripViewController.h // XLPagerTabStrip ( https://github.com/xmartlabs/XLPagerTabStrip ) // -// Copyright (c) 2014 Xmartlabs ( http://xmartlabs.com ) +// Copyright (c) 2015 Xmartlabs ( http://xmartlabs.com ) // // // Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/XLPagerTabStrip/XL/Controllers/XLSegmentedPagerTabStripViewController.m b/XLPagerTabStrip/XL/Controllers/XLSegmentedPagerTabStripViewController.m index f73d721..e95ae35 100644 --- a/XLPagerTabStrip/XL/Controllers/XLSegmentedPagerTabStripViewController.m +++ b/XLPagerTabStrip/XL/Controllers/XLSegmentedPagerTabStripViewController.m @@ -2,7 +2,7 @@ // XLSegmentedPagerTabStripViewController.m // XLPagerTabStrip ( https://github.com/xmartlabs/XLPagerTabStrip ) // -// Copyright (c) 2014 Xmartlabs ( http://xmartlabs.com ) +// Copyright (c) 2015 Xmartlabs ( http://xmartlabs.com ) // // // Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/XLPagerTabStrip/XL/Controllers/XLTwitterPagerTabStripViewController.h b/XLPagerTabStrip/XL/Controllers/XLTwitterPagerTabStripViewController.h new file mode 100644 index 0000000..6119207 --- /dev/null +++ b/XLPagerTabStrip/XL/Controllers/XLTwitterPagerTabStripViewController.h @@ -0,0 +1,32 @@ +// +// XLTwitterPagerTabStripViewController.h +// XLPagerTabStrip ( https://github.com/xmartlabs/XLPagerTabStrip ) +// +// Copyright (c) 2015 Xmartlabs ( http://xmartlabs.com ) +// +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import "XLPagerTabStripViewController.h" + +@interface XLTwitterPagerTabStripViewController : XLPagerTabStripViewController + +@property (nonatomic, readonly) UIView * navigationView; + +@end diff --git a/XLPagerTabStrip/XL/Controllers/XLTwitterPagerTabStripViewController.m b/XLPagerTabStrip/XL/Controllers/XLTwitterPagerTabStripViewController.m new file mode 100644 index 0000000..ad49141 --- /dev/null +++ b/XLPagerTabStrip/XL/Controllers/XLTwitterPagerTabStripViewController.m @@ -0,0 +1,255 @@ +// +// XLTwitterPagerTabStripViewController.m +// XLPagerTabStrip ( https://github.com/xmartlabs/XLPagerTabStrip ) +// +// Copyright (c) 2015 Xmartlabs ( http://xmartlabs.com ) +// +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import "XLTwitterPagerTabStripViewController.h" +#import "TableChildExampleViewController.h" +#import "ChildExampleViewController.h" +#import "FXPageControl.h" + +@interface XLTwitterPagerTabStripViewController () + +@property (nonatomic) UIView * navigationView; +@property (nonatomic) UIScrollView * navigationScrollView; +@property (nonatomic) FXPageControl * navigationPageControl; +@property (nonatomic, strong) NSMutableArray * navigationItemsViews; + +@end + + +@implementation XLTwitterPagerTabStripViewController + +- (void)viewDidLoad +{ + [super viewDidLoad]; + if (!self.navigationView.superview) { + self.navigationItem.titleView = self.navigationView; + } + if (!self.navigationScrollView.superview) { + [self.navigationView addSubview:self.navigationScrollView]; + } + + if (!self.navigationPageControl.superview) { + [self.navigationView addSubview:self.navigationPageControl]; + } + + [self reloadNavigationViewItems]; +} + +-(void)viewWillAppear:(BOOL)animated +{ + [super viewWillAppear:animated]; + [self.navigationView setFrame:CGRectMake(0, 0, CGRectGetWidth(self.navigationController.navigationBar.frame) , CGRectGetHeight(self.navigationController.navigationBar.frame))]; + [self.navigationView addObserver:self forKeyPath:@"frame" options:NSKeyValueObservingOptionNew | NSKeyValueObservingOptionOld context:0]; +} + + +-(void)reloadPagerTabStripView +{ + [super reloadPagerTabStripView]; + if ([self isViewLoaded]) + { + [self reloadNavigationViewItems]; + [self setNavigationViewItemsPosition]; + } +} + +-(void)setIsProgressiveIndicator:(BOOL)isProgressiveIndicator +{ + [super setIsProgressiveIndicator:YES]; +} + + +#pragma mark - Properties + +-(UIView *)navigationView +{ + if (_navigationView) return _navigationView; + _navigationView = [[UIView alloc] init]; + _navigationView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; + return _navigationView; +} + +- (UIScrollView *)navigationScrollView +{ + if (_navigationScrollView) return _navigationScrollView; + _navigationScrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, CGRectGetWidth(self.view.bounds), 44)]; + _navigationScrollView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; + _navigationScrollView.bounces = YES; + _navigationScrollView.scrollsToTop = NO; + _navigationScrollView.delegate = self; + _navigationScrollView.showsVerticalScrollIndicator = NO; + _navigationScrollView.showsHorizontalScrollIndicator = NO; + _navigationScrollView.pagingEnabled = YES; + _navigationScrollView.userInteractionEnabled = NO; + [_navigationScrollView setAlwaysBounceHorizontal:YES]; + [_navigationScrollView setAlwaysBounceVertical:NO]; + return _navigationScrollView; +} + +-(NSMutableArray *)navigationItemsViews +{ + if (_navigationItemsViews) return _navigationItemsViews; + _navigationItemsViews = [[NSMutableArray alloc] init]; + return _navigationItemsViews; +} + +-(FXPageControl *)navigationPageControl +{ + if (_navigationPageControl) return _navigationPageControl; + _navigationPageControl = [[FXPageControl alloc] init]; + [_navigationPageControl setBackgroundColor:[UIColor clearColor]]; + [_navigationPageControl setDotSize:3.8f]; + [_navigationPageControl setDotSpacing:4.0f]; + [_navigationPageControl setDotColor:[UIColor colorWithWhite:1 alpha:0.4]]; + [_navigationPageControl setSelectedDotColor:[UIColor whiteColor]]; + return _navigationPageControl; +} + + +#pragma mark - XLPagerTabStripViewControllerDataSource + +-(void)pagerTabStripViewController:(XLPagerTabStripViewController *)pagerTabStripViewController + updateIndicatorFromIndex:(NSInteger)fromIndex + toIndex:(NSInteger)toIndex +{ + // not accept no progressive indicator +} + +-(void)pagerTabStripViewController:(XLPagerTabStripViewController *)pagerTabStripViewController + updateIndicatorFromIndex:(NSInteger)fromIndex + toIndex:(NSInteger)toIndex + withProgressPercentage:(CGFloat)progressPercentage +{ + CGFloat distance = [self getDistanceValue]; + UIAccelerationValue xOffset = fromIndex < toIndex ? distance * fromIndex + distance * progressPercentage : distance * fromIndex - distance * progressPercentage; + [self.navigationScrollView setContentOffset:CGPointMake(xOffset, 0)]; + [self setAlphaWithOffset:xOffset]; + [_navigationPageControl setCurrentPage:self.currentIndex]; +} + + +#pragma mark - KVO + +-(void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context +{ + if ((object == self.navigationItem.titleView && [keyPath isEqualToString:@"frame"])){ + if ([[change objectForKey:NSKeyValueChangeKindKey] isEqualToNumber:@(NSKeyValueChangeSetting)]){ + CGRect oldRect = [change[NSKeyValueChangeOldKey] CGRectValue]; + CGRect newRect = [change[NSKeyValueChangeNewKey] CGRectValue]; + if (!CGRectEqualToRect(newRect,oldRect)) { + [self.navigationScrollView setFrame:CGRectMake(0, 0, CGRectGetWidth(self.navigationView.frame) , CGRectGetHeight(self.navigationScrollView.frame))]; + [self setNavigationViewItemsPosition]; + } + } + } +} + +-(void)dealloc +{ + [self.navigationView removeObserver:self forKeyPath:@"frame"]; +} + + +#pragma mark - Helpers + +-(void)reloadNavigationViewItems +{ + [self.navigationItemsViews enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) { + [obj removeFromSuperview]; + }]; + [self.navigationItemsViews removeAllObjects]; + + + [self.pagerTabStripChildViewControllers enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) { + NSAssert([obj conformsToProtocol:@protocol(XLPagerTabStripChildItem)], @"child view controller must conform to XLPagerTabStripChildItem"); + UIViewController * childViewController = (UIViewController *)obj; + if ([childViewController respondsToSelector:@selector(titleForPagerTabStripViewController:)]){ + UILabel *navTitleLabel = [self createNewLabelWithText:[childViewController titleForPagerTabStripViewController:self]]; + [navTitleLabel setAlpha: self.currentIndex == idx ? 1 : 0]; + [_navigationScrollView addSubview:navTitleLabel]; + [_navigationItemsViews addObject:navTitleLabel]; + } + }]; +} + +-(void)setNavigationViewItemsPosition +{ + CGFloat distance = [self getDistanceValue]; + + [self.navigationItemsViews enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) { + int index = (int)idx; + UIView *view = (UIView *)obj; + [view setAlpha: self.currentIndex == idx ? 1 : 0]; + CGSize viewSize = [view isKindOfClass:[UILabel class]] ? [self getLabelSize:(UILabel*)view] : view.frame.size; + CGFloat originX = (distance - viewSize.width/2) + index * distance; + view.frame = (CGRect){originX, 8, viewSize.width, viewSize.height}; + view.tag = index; + }]; + + UIAccelerationValue xOffset = distance * self.currentIndex; + [self.navigationScrollView setContentOffset:CGPointMake(xOffset, 0)]; + + // Update Navigation Page Control + [self.navigationPageControl setNumberOfPages:[self.navigationItemsViews count]]; + [self.navigationPageControl setCurrentPage:self.currentIndex]; + CGSize viewSize = [self.navigationPageControl sizeForNumberOfPages:[self.navigationItemsViews count]]; + CGFloat originX = (distance - viewSize.width/2); + [self.navigationPageControl setFrame:(CGRect){originX, 34, viewSize.width, viewSize.height}]; +} + +-(void)setAlphaWithOffset:(UIAccelerationValue)xOffset +{ + CGFloat distance = [self getDistanceValue]; + [self.navigationItemsViews enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) { + int index = (int)idx; + CGFloat alpha = xOffset < distance * index ? (xOffset - distance * (index - 1)) / distance : 1 - ((xOffset - distance * index) / distance); + [obj setAlpha:alpha]; + }]; +} + +-(UILabel *)createNewLabelWithText:(NSString *)text +{ + UILabel *navTitleLabel = [UILabel new]; + navTitleLabel.text = text; + navTitleLabel.font = [UIFont fontWithName:@"Helvetica" size:18]; + navTitleLabel.textColor = [UIColor whiteColor]; + navTitleLabel.alpha = 0; + return navTitleLabel; +} + +-(CGSize)getLabelSize:(UILabel *)label +{ + return [[label text] sizeWithAttributes:@{NSFontAttributeName:[label font]}];; +} + +-(CGFloat)getDistanceValue +{ + CGPoint middle = [self.navigationController.navigationBar convertPoint:self.navigationController.navigationBar.center toView:self.navigationView]; + return middle.x ; +} + + + +@end diff --git a/XLPagerTabStrip/XL/Views/XLBarView.h b/XLPagerTabStrip/XL/Views/XLBarView.h index 0ff6ca3..ef21755 100644 --- a/XLPagerTabStrip/XL/Views/XLBarView.h +++ b/XLPagerTabStrip/XL/Views/XLBarView.h @@ -2,7 +2,7 @@ // XLBarView.h // XLPagerTabStrip ( https://github.com/xmartlabs/XLPagerTabStrip ) // -// Copyright (c) 2014 Xmartlabs ( http://xmartlabs.com ) +// Copyright (c) 2015 Xmartlabs ( http://xmartlabs.com ) // // // Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/XLPagerTabStrip/XL/Views/XLBarView.m b/XLPagerTabStrip/XL/Views/XLBarView.m index 2f6fd04..d31eee2 100644 --- a/XLPagerTabStrip/XL/Views/XLBarView.m +++ b/XLPagerTabStrip/XL/Views/XLBarView.m @@ -2,7 +2,7 @@ // XLBarView.m // XLPagerTabStrip ( https://github.com/xmartlabs/XLPagerTabStrip ) // -// Copyright (c) 2014 Xmartlabs ( http://xmartlabs.com ) +// Copyright (c) 2015 Xmartlabs ( http://xmartlabs.com ) // // // Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/XLPagerTabStrip/XL/Views/XLButtonBarView.h b/XLPagerTabStrip/XL/Views/XLButtonBarView.h index 27251bf..35c7656 100644 --- a/XLPagerTabStrip/XL/Views/XLButtonBarView.h +++ b/XLPagerTabStrip/XL/Views/XLButtonBarView.h @@ -2,7 +2,7 @@ // XLButtonBarView.h // XLPagerTabStrip ( https://github.com/xmartlabs/XLPagerTabStrip ) // -// Copyright (c) 2014 Xmartlabs ( http://xmartlabs.com ) +// Copyright (c) 2015 Xmartlabs ( http://xmartlabs.com ) // // // Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/XLPagerTabStrip/XL/Views/XLButtonBarView.m b/XLPagerTabStrip/XL/Views/XLButtonBarView.m index 2fede8f..0f8e81c 100644 --- a/XLPagerTabStrip/XL/Views/XLButtonBarView.m +++ b/XLPagerTabStrip/XL/Views/XLButtonBarView.m @@ -2,7 +2,7 @@ // XLButtonBarView.m // XLPagerTabStrip ( https://github.com/xmartlabs/XLPagerTabStrip ) // -// Copyright (c) 2014 Xmartlabs ( http://xmartlabs.com ) +// Copyright (c) 2015 Xmartlabs ( http://xmartlabs.com ) // // // Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/XLPagerTabStrip/XL/Views/XLButtonBarViewCell.h b/XLPagerTabStrip/XL/Views/XLButtonBarViewCell.h index bea7faa..ce011f8 100644 --- a/XLPagerTabStrip/XL/Views/XLButtonBarViewCell.h +++ b/XLPagerTabStrip/XL/Views/XLButtonBarViewCell.h @@ -2,7 +2,7 @@ // XLButtonBarViewCell.h // XLPagerTabStrip ( https://github.com/xmartlabs/XLPagerTabStrip ) // -// Copyright (c) 2014 Xmartlabs ( http://xmartlabs.com ) +// Copyright (c) 2015 Xmartlabs ( http://xmartlabs.com ) // // // Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/XLPagerTabStrip/XL/Views/XLButtonBarViewCell.m b/XLPagerTabStrip/XL/Views/XLButtonBarViewCell.m index f76e7c0..f207ff3 100644 --- a/XLPagerTabStrip/XL/Views/XLButtonBarViewCell.m +++ b/XLPagerTabStrip/XL/Views/XLButtonBarViewCell.m @@ -2,7 +2,7 @@ // XLButtonBarViewCell.m // XLPagerTabStrip ( https://github.com/xmartlabs/XLPagerTabStrip ) // -// Copyright (c) 2014 Xmartlabs ( http://xmartlabs.com ) +// Copyright (c) 2015 Xmartlabs ( http://xmartlabs.com ) // // // Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/XLPagerTabStrip/main.m b/XLPagerTabStrip/main.m index 2511df6..cbfad0c 100644 --- a/XLPagerTabStrip/main.m +++ b/XLPagerTabStrip/main.m @@ -2,7 +2,7 @@ // main.m // XLPagerTabStrip ( https://github.com/xmartlabs/XLPagerTabStrip ) // -// Copyright (c) 2014 Xmartlabs ( http://xmartlabs.com ) +// Copyright (c) 2015 Xmartlabs ( http://xmartlabs.com ) // // // Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/XLPagerTabStripTests/XLPagerTabStripTests.m b/XLPagerTabStripTests/XLPagerTabStripTests.m index 0043cf5..ae306d1 100644 --- a/XLPagerTabStripTests/XLPagerTabStripTests.m +++ b/XLPagerTabStripTests/XLPagerTabStripTests.m @@ -2,7 +2,7 @@ // XLPagerTabStripTests.m // XLPagerTabStrip ( https://github.com/xmartlabs/XLPagerTabStrip ) // -// Copyright (c) 2014 Xmartlabs ( http://xmartlabs.com ) +// Copyright (c) 2015 Xmartlabs ( http://xmartlabs.com ) // // // Permission is hereby granted, free of charge, to any person obtaining a copy