From fc773324f90f1eec7b3d58e06d2e3ddc958a71d9 Mon Sep 17 00:00:00 2001 From: Alexander Kormanovsky Date: Mon, 19 Sep 2016 15:43:22 +0300 Subject: [PATCH 01/10] buttons property exposed --- MHCustomTabBarController/MHCustomTabBarController.h | 1 + MHCustomTabBarController/MHCustomTabBarController.m | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 MHCustomTabBarController/MHCustomTabBarController.h mode change 100644 => 100755 MHCustomTabBarController/MHCustomTabBarController.m diff --git a/MHCustomTabBarController/MHCustomTabBarController.h b/MHCustomTabBarController/MHCustomTabBarController.h old mode 100644 new mode 100755 index 9a6c613..364115a --- a/MHCustomTabBarController/MHCustomTabBarController.h +++ b/MHCustomTabBarController/MHCustomTabBarController.h @@ -30,6 +30,7 @@ extern NSString *const MHCustomTabBarControllerViewControllerAlreadyVisibleNotif @property (weak,nonatomic) UIViewController *destinationViewController; @property (strong, nonatomic) UIViewController *oldViewController; @property (weak, nonatomic) IBOutlet UIView *container; +@property (nonatomic) IBOutletCollection(UIButton) NSArray *buttons; @property (assign, nonatomic) NSInteger selectedIndex; diff --git a/MHCustomTabBarController/MHCustomTabBarController.m b/MHCustomTabBarController/MHCustomTabBarController.m old mode 100644 new mode 100755 index d26f290..22c79bb --- a/MHCustomTabBarController/MHCustomTabBarController.m +++ b/MHCustomTabBarController/MHCustomTabBarController.m @@ -31,7 +31,6 @@ @interface MHCustomTabBarController () @property (nonatomic, strong) NSMutableDictionary *viewControllersByIdentifier; @property (strong, nonatomic) NSString *destinationIdentifier; -@property (nonatomic) IBOutletCollection(UIButton) NSArray *buttons; @end From e71c9636a047a357d2b88364f7519fd48dfcf193 Mon Sep 17 00:00:00 2001 From: Alexander Kormanovsky Date: Mon, 2 Aug 2021 11:46:25 +0300 Subject: [PATCH 02/10] add replaceOldViewController property; add keepSelection property; add segmentedControl support; --- .../MHCustomTabBarController.h | 8 +++++ .../MHCustomTabBarController.m | 35 +++++++++++++++---- MHCustomTabBarController/MHTabBarSegue.h | 2 ++ MHCustomTabBarController/MHTabBarSegue.m | 12 ++++++- 4 files changed, 49 insertions(+), 8 deletions(-) mode change 100644 => 100755 MHCustomTabBarController/MHTabBarSegue.h mode change 100644 => 100755 MHCustomTabBarController/MHTabBarSegue.m diff --git a/MHCustomTabBarController/MHCustomTabBarController.h b/MHCustomTabBarController/MHCustomTabBarController.h index 364115a..e8f6f05 100755 --- a/MHCustomTabBarController/MHCustomTabBarController.h +++ b/MHCustomTabBarController/MHCustomTabBarController.h @@ -31,7 +31,15 @@ extern NSString *const MHCustomTabBarControllerViewControllerAlreadyVisibleNotif @property (strong, nonatomic) UIViewController *oldViewController; @property (weak, nonatomic) IBOutlet UIView *container; @property (nonatomic) IBOutletCollection(UIButton) NSArray *buttons; +@property (weak, nonatomic) IBOutlet UISegmentedControl *segmentedControl; @property (assign, nonatomic) NSInteger selectedIndex; +/// do not clear previous selection +@property (assign, nonatomic) BOOL keepSelection; +/** + * Replace old view controller with new one. + * self.childViewControllers will contain only one (current) view controller in this case + */ +@property (nonatomic) BOOL replaceOldViewController; @end diff --git a/MHCustomTabBarController/MHCustomTabBarController.m b/MHCustomTabBarController/MHCustomTabBarController.m index 22c79bb..b51d023 100755 --- a/MHCustomTabBarController/MHCustomTabBarController.m +++ b/MHCustomTabBarController/MHCustomTabBarController.m @@ -40,13 +40,18 @@ - (void)viewDidLoad { [super viewDidLoad]; self.viewControllersByIdentifier = [NSMutableDictionary dictionary]; + self.replaceOldViewController = YES; } - (void)viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; + assert(self.buttons || self.segmentedControl); + + id sender = (self.buttons) ? self.buttons[0] : self.segmentedControl; + if (self.childViewControllers.count < 1) { - [self performSegueWithIdentifier:@"viewController1" sender:[self.buttons objectAtIndex:0]]; + [self performSegueWithIdentifier:@"viewController1" sender:sender]; } } @@ -61,20 +66,36 @@ - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { [super prepareForSegue:segue sender:sender]; return; } + + ((MHTabBarSegue *)segue).replaceOldViewController = self.replaceOldViewController; self.oldViewController = self.destinationViewController; //if view controller isn't already contained in the viewControllers-Dictionary - if (![self.viewControllersByIdentifier objectForKey:segue.identifier]) { - [self.viewControllersByIdentifier setObject:segue.destinationViewController forKey:segue.identifier]; + if (!self.viewControllersByIdentifier[segue.identifier]) { + self.viewControllersByIdentifier[segue.identifier] = segue.destinationViewController; } - [self.buttons setValue:@NO forKeyPath:@"selected"]; - [sender setSelected:YES]; - self.selectedIndex = [self.buttons indexOfObject:sender]; + assert(self.buttons || self.segmentedControl); + + if (self.buttons) { + for (UIButton *btn in self.buttons) { + if (self.keepSelection) { + continue; + } + + btn.selected = NO; + } + + [sender setSelected:YES]; + self.selectedIndex = [self.buttons indexOfObject:sender]; + } else { + [sender setSelected:YES]; + self.selectedIndex = self.segmentedControl.selectedSegmentIndex; + } self.destinationIdentifier = segue.identifier; - self.destinationViewController = [self.viewControllersByIdentifier objectForKey:self.destinationIdentifier]; + self.destinationViewController = self.viewControllersByIdentifier[self.destinationIdentifier]; [[NSNotificationCenter defaultCenter] postNotificationName:MHCustomTabBarControllerViewControllerChangedNotification object:nil]; } diff --git a/MHCustomTabBarController/MHTabBarSegue.h b/MHCustomTabBarController/MHTabBarSegue.h old mode 100644 new mode 100755 index c76f431..300aac2 --- a/MHCustomTabBarController/MHTabBarSegue.h +++ b/MHCustomTabBarController/MHTabBarSegue.h @@ -24,4 +24,6 @@ @interface MHTabBarSegue : UIStoryboardSegue +@property (nonatomic) BOOL replaceOldViewController; + @end diff --git a/MHCustomTabBarController/MHTabBarSegue.m b/MHCustomTabBarController/MHTabBarSegue.m old mode 100644 new mode 100755 index 801e901..c97547f --- a/MHCustomTabBarController/MHTabBarSegue.m +++ b/MHCustomTabBarController/MHTabBarSegue.m @@ -25,12 +25,22 @@ @implementation MHTabBarSegue +- (instancetype)initWithIdentifier:(nullable NSString *)identifier + source:(UIViewController *)source + destination:(UIViewController *)destination +{ + if ((self = [super initWithIdentifier:identifier source:source destination:destination])) { + self.replaceOldViewController = YES; + } + return self; +} + - (void)perform { MHCustomTabBarController *tabBarViewController = (MHCustomTabBarController *)self.sourceViewController; UIViewController *destinationViewController = (UIViewController *)tabBarViewController.destinationViewController; //remove old viewController - if (tabBarViewController.oldViewController) { + if (tabBarViewController.oldViewController && self.replaceOldViewController) { [tabBarViewController.oldViewController willMoveToParentViewController:nil]; [tabBarViewController.oldViewController.view removeFromSuperview]; [tabBarViewController.oldViewController removeFromParentViewController]; From bb7bab56295efdea684ddd5ece4573116a82679b Mon Sep 17 00:00:00 2001 From: Alexander Kormanovsky Date: Mon, 2 Aug 2021 13:35:59 +0300 Subject: [PATCH 03/10] renaming; add usesTabs property; --- .../MHCustomTabBarController.h | 8 +++++-- .../MHCustomTabBarController.m | 24 +++++++++++++++---- MHCustomTabBarController/MHTabBarSegue.h | 2 +- MHCustomTabBarController/MHTabBarSegue.m | 6 ++--- 4 files changed, 30 insertions(+), 10 deletions(-) diff --git a/MHCustomTabBarController/MHCustomTabBarController.h b/MHCustomTabBarController/MHCustomTabBarController.h index e8f6f05..2f1b98e 100755 --- a/MHCustomTabBarController/MHCustomTabBarController.h +++ b/MHCustomTabBarController/MHCustomTabBarController.h @@ -35,11 +35,15 @@ extern NSString *const MHCustomTabBarControllerViewControllerAlreadyVisibleNotif @property (assign, nonatomic) NSInteger selectedIndex; /// do not clear previous selection -@property (assign, nonatomic) BOOL keepSelection; +@property (assign, nonatomic) BOOL keepsSelection; /** * Replace old view controller with new one. * self.childViewControllers will contain only one (current) view controller in this case */ -@property (nonatomic) BOOL replaceOldViewController; +@property (nonatomic) BOOL replacesOldViewController; +/** + * Defaults to YES, If NO behave as ordinary view controller (not using custom segues logic) + */ +@property (nonatomic) BOOL usesTabs; @end diff --git a/MHCustomTabBarController/MHCustomTabBarController.m b/MHCustomTabBarController/MHCustomTabBarController.m index b51d023..6b835ab 100755 --- a/MHCustomTabBarController/MHCustomTabBarController.m +++ b/MHCustomTabBarController/MHCustomTabBarController.m @@ -40,11 +40,16 @@ - (void)viewDidLoad { [super viewDidLoad]; self.viewControllersByIdentifier = [NSMutableDictionary dictionary]; - self.replaceOldViewController = YES; + self.replacesOldViewController = YES; + self.usesTabs = YES; } - (void)viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; + + if (!self.usesTabs) { + return; + } assert(self.buttons || self.segmentedControl); @@ -62,12 +67,12 @@ - (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInte #pragma mark - Segue - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { - if (![segue isKindOfClass:[MHTabBarSegue class]]) { + if (!self.usesTabs || ![segue isKindOfClass:[MHTabBarSegue class]]) { [super prepareForSegue:segue sender:sender]; return; } - ((MHTabBarSegue *)segue).replaceOldViewController = self.replaceOldViewController; + ((MHTabBarSegue *)segue).replacesOldViewController = self.replacesOldViewController; self.oldViewController = self.destinationViewController; @@ -80,7 +85,7 @@ - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { if (self.buttons) { for (UIButton *btn in self.buttons) { - if (self.keepSelection) { + if (self.keepsSelection) { continue; } @@ -101,6 +106,11 @@ - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { } - (BOOL)shouldPerformSegueWithIdentifier:(NSString *)identifier sender:(id)sender { + + if (!self.usesTabs) { + return [super shouldPerformSegueWithIdentifier:identifier sender:sender]; + } + if ([self.destinationIdentifier isEqual:identifier]) { //Dont perform segue, if visible ViewController is already the destination ViewController [[NSNotificationCenter defaultCenter] postNotificationName:MHCustomTabBarControllerViewControllerAlreadyVisibleNotification object:nil]; @@ -112,6 +122,12 @@ - (BOOL)shouldPerformSegueWithIdentifier:(NSString *)identifier sender:(id)sende #pragma mark - Memory Warning - (void)didReceiveMemoryWarning { + + if (!self.usesTabs) { + [super didReceiveMemoryWarning]; + return; + } + [[self.viewControllersByIdentifier allKeys] enumerateObjectsUsingBlock:^(NSString *key, NSUInteger idx, BOOL *stop) { if (![self.destinationIdentifier isEqualToString:key]) { [self.viewControllersByIdentifier removeObjectForKey:key]; diff --git a/MHCustomTabBarController/MHTabBarSegue.h b/MHCustomTabBarController/MHTabBarSegue.h index 300aac2..4fda8ca 100755 --- a/MHCustomTabBarController/MHTabBarSegue.h +++ b/MHCustomTabBarController/MHTabBarSegue.h @@ -24,6 +24,6 @@ @interface MHTabBarSegue : UIStoryboardSegue -@property (nonatomic) BOOL replaceOldViewController; +@property (nonatomic) BOOL replacesOldViewController; @end diff --git a/MHCustomTabBarController/MHTabBarSegue.m b/MHCustomTabBarController/MHTabBarSegue.m index c97547f..62f3f8f 100755 --- a/MHCustomTabBarController/MHTabBarSegue.m +++ b/MHCustomTabBarController/MHTabBarSegue.m @@ -30,17 +30,17 @@ - (instancetype)initWithIdentifier:(nullable NSString *)identifier destination:(UIViewController *)destination { if ((self = [super initWithIdentifier:identifier source:source destination:destination])) { - self.replaceOldViewController = YES; + self.replacesOldViewController = YES; } return self; } - (void)perform { MHCustomTabBarController *tabBarViewController = (MHCustomTabBarController *)self.sourceViewController; - UIViewController *destinationViewController = (UIViewController *)tabBarViewController.destinationViewController; + UIViewController *destinationViewController = tabBarViewController.destinationViewController; //remove old viewController - if (tabBarViewController.oldViewController && self.replaceOldViewController) { + if (tabBarViewController.oldViewController && self.replacesOldViewController) { [tabBarViewController.oldViewController willMoveToParentViewController:nil]; [tabBarViewController.oldViewController.view removeFromSuperview]; [tabBarViewController.oldViewController removeFromParentViewController]; From 377336f3a0db8b4edaaad0a2c4fd0fe78ad2168f Mon Sep 17 00:00:00 2001 From: Alexander Kormanovsky Date: Mon, 2 Aug 2021 14:11:03 +0300 Subject: [PATCH 04/10] use autolayout for segues --- MHCustomTabBarController/MHTabBarSegue.m | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/MHCustomTabBarController/MHTabBarSegue.m b/MHCustomTabBarController/MHTabBarSegue.m index 62f3f8f..225b58e 100755 --- a/MHCustomTabBarController/MHTabBarSegue.m +++ b/MHCustomTabBarController/MHTabBarSegue.m @@ -46,9 +46,19 @@ - (void)perform { [tabBarViewController.oldViewController removeFromParentViewController]; } - destinationViewController.view.frame = tabBarViewController.container.bounds; [tabBarViewController addChildViewController:destinationViewController]; - [tabBarViewController.container addSubview:destinationViewController.view]; + + UIView *view = destinationViewController.view; + view.translatesAutoresizingMaskIntoConstraints = NO; + + UIView *container = tabBarViewController.container; + [container addSubview:view]; + + [view.leadingAnchor constraintEqualToAnchor:container.leadingAnchor].active = YES; + [view.trailingAnchor constraintEqualToAnchor:container.trailingAnchor].active = YES; + [view.topAnchor constraintEqualToAnchor:container.topAnchor].active = YES; + [view.bottomAnchor constraintEqualToAnchor:container.bottomAnchor].active = YES; + [destinationViewController didMoveToParentViewController:tabBarViewController]; } From 7f039a101aea5f4f2eddafe30bdf58bfcc6407c0 Mon Sep 17 00:00:00 2001 From: Alexander Kormanovsky Date: Fri, 1 Oct 2021 13:30:01 +0300 Subject: [PATCH 05/10] add comments; add initialSelectedButton property; add initialSegueIdentifier property; --- .../MHCustomTabBarController.h | 18 ++++++++++--- .../MHCustomTabBarController.m | 26 +++++++++++++++---- 2 files changed, 36 insertions(+), 8 deletions(-) diff --git a/MHCustomTabBarController/MHCustomTabBarController.h b/MHCustomTabBarController/MHCustomTabBarController.h index 2f1b98e..25c5b6b 100755 --- a/MHCustomTabBarController/MHCustomTabBarController.h +++ b/MHCustomTabBarController/MHCustomTabBarController.h @@ -33,9 +33,21 @@ extern NSString *const MHCustomTabBarControllerViewControllerAlreadyVisibleNotif @property (nonatomic) IBOutletCollection(UIButton) NSArray *buttons; @property (weak, nonatomic) IBOutlet UISegmentedControl *segmentedControl; -@property (assign, nonatomic) NSInteger selectedIndex; -/// do not clear previous selection -@property (assign, nonatomic) BOOL keepsSelection; +@property (nonatomic, readonly) NSInteger selectedIndex; +/** + * Button to be selected initially, + * set it in subclass before [super viewWillAppear:] call + */ +@property (nonatomic) UIButton *initialSelectedButton; +/** + * Segue identifier for view controller that should be opened initially, + * set it in subclass before [super viewWillAppear:] call + */ +@property (nonatomic) NSString *initialSegueIdentifier; +/** + * Do not clear previous selection + */ +@property (nonatomic) BOOL keepsSelection; /** * Replace old view controller with new one. * self.childViewControllers will contain only one (current) view controller in this case diff --git a/MHCustomTabBarController/MHCustomTabBarController.m b/MHCustomTabBarController/MHCustomTabBarController.m index 6b835ab..0f389c9 100755 --- a/MHCustomTabBarController/MHCustomTabBarController.m +++ b/MHCustomTabBarController/MHCustomTabBarController.m @@ -27,6 +27,9 @@ NSString *const MHCustomTabBarControllerViewControllerChangedNotification = @"MHCustomTabBarControllerViewControllerChangedNotification"; NSString *const MHCustomTabBarControllerViewControllerAlreadyVisibleNotification = @"MHCustomTabBarControllerViewControllerAlreadyVisibleNotification"; +NSString *const kDefaultSegueIdentifier = @"viewController1"; + + @interface MHCustomTabBarController () @property (nonatomic, strong) NSMutableDictionary *viewControllersByIdentifier; @@ -34,6 +37,7 @@ @interface MHCustomTabBarController () @end + @implementation MHCustomTabBarController - (void)viewDidLoad { @@ -52,11 +56,23 @@ - (void)viewWillAppear:(BOOL)animated { } assert(self.buttons || self.segmentedControl); - - id sender = (self.buttons) ? self.buttons[0] : self.segmentedControl; + + id sender; + + if (self.buttons) { + sender = self.initialSelectedButton + ? self.initialSelectedButton + : self.buttons.firstObject; + } else { + sender = self.segmentedControl; + } + + if (!self.initialSegueIdentifier) { + self.initialSegueIdentifier = kDefaultSegueIdentifier; + } if (self.childViewControllers.count < 1) { - [self performSegueWithIdentifier:@"viewController1" sender:sender]; + [self performSegueWithIdentifier:self.initialSegueIdentifier sender:sender]; } } @@ -93,10 +109,10 @@ - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { } [sender setSelected:YES]; - self.selectedIndex = [self.buttons indexOfObject:sender]; + _selectedIndex = [self.buttons indexOfObject:sender]; } else { [sender setSelected:YES]; - self.selectedIndex = self.segmentedControl.selectedSegmentIndex; + _selectedIndex = self.segmentedControl.selectedSegmentIndex; } self.destinationIdentifier = segue.identifier; From 9785081c8208821a54ccb96a22c2f67f4253397a Mon Sep 17 00:00:00 2001 From: Alexander Kormanovsky Date: Fri, 21 Apr 2023 10:06:16 +0300 Subject: [PATCH 06/10] change git source in podspec --- MHCustomTabBarController.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MHCustomTabBarController.podspec b/MHCustomTabBarController.podspec index a022b7a..15b5853 100644 --- a/MHCustomTabBarController.podspec +++ b/MHCustomTabBarController.podspec @@ -11,7 +11,7 @@ Pod::Spec.new do |s| 'Martin Hartl' => 'martin@mhaddl.me' } s.source = { - :git => 'https://github.com/mhaddl/MHCustomTabBarController.git', + :git => 'https://github.com/schmidt9/MHCustomTabBarController.git', :tag => 'v1.2.1' } s.source_files = 'MHCustomTabBarController/*.{m,h}' From f89bce69cbd9026b28caa2ed4e7921f33a17e6cd Mon Sep 17 00:00:00 2001 From: Alexander Kormanovsky Date: Fri, 21 Apr 2023 10:11:11 +0300 Subject: [PATCH 07/10] Revert "change git source in podspec" This reverts commit 9785081c8208821a54ccb96a22c2f67f4253397a. --- MHCustomTabBarController.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MHCustomTabBarController.podspec b/MHCustomTabBarController.podspec index 15b5853..a022b7a 100644 --- a/MHCustomTabBarController.podspec +++ b/MHCustomTabBarController.podspec @@ -11,7 +11,7 @@ Pod::Spec.new do |s| 'Martin Hartl' => 'martin@mhaddl.me' } s.source = { - :git => 'https://github.com/schmidt9/MHCustomTabBarController.git', + :git => 'https://github.com/mhaddl/MHCustomTabBarController.git', :tag => 'v1.2.1' } s.source_files = 'MHCustomTabBarController/*.{m,h}' From 20303bf86f98f1e198477a7758d2ff93a6374d90 Mon Sep 17 00:00:00 2001 From: schmidt9 Date: Mon, 8 May 2023 10:50:09 +0300 Subject: [PATCH 08/10] Update MHCustomTabBarController.podspec version 1.3.0 --- MHCustomTabBarController.podspec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MHCustomTabBarController.podspec b/MHCustomTabBarController.podspec index a022b7a..61939c9 100644 --- a/MHCustomTabBarController.podspec +++ b/MHCustomTabBarController.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'MHCustomTabBarController' - s.version = '1.2.1' + s.version = '1.3.0' s.platform = :ios s.ios.deployment_target = '6.0' s.summary = 'Custom UITabBar replacement using storyboard and segues.' @@ -12,7 +12,7 @@ Pod::Spec.new do |s| } s.source = { :git => 'https://github.com/mhaddl/MHCustomTabBarController.git', - :tag => 'v1.2.1' + :tag => 'v1.3.0' } s.source_files = 'MHCustomTabBarController/*.{m,h}' end From 14c39343213499d5de69402bad3f9381a5505ba1 Mon Sep 17 00:00:00 2001 From: schmidt9 Date: Mon, 8 May 2023 10:52:53 +0300 Subject: [PATCH 09/10] Update MHCustomTabBarController.podspec --- MHCustomTabBarController.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MHCustomTabBarController.podspec b/MHCustomTabBarController.podspec index 61939c9..4b226ab 100644 --- a/MHCustomTabBarController.podspec +++ b/MHCustomTabBarController.podspec @@ -11,7 +11,7 @@ Pod::Spec.new do |s| 'Martin Hartl' => 'martin@mhaddl.me' } s.source = { - :git => 'https://github.com/mhaddl/MHCustomTabBarController.git', + :git => 'https://github.com/schmidt9/MHCustomTabBarController.git, :tag => 'v1.3.0' } s.source_files = 'MHCustomTabBarController/*.{m,h}' From 22f904c88e4263e4cf086203c5c07449e0e028cf Mon Sep 17 00:00:00 2001 From: schmidt9 Date: Mon, 8 May 2023 11:41:26 +0300 Subject: [PATCH 10/10] Update MHCustomTabBarController.podspec --- MHCustomTabBarController.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MHCustomTabBarController.podspec b/MHCustomTabBarController.podspec index 4b226ab..ae5e310 100644 --- a/MHCustomTabBarController.podspec +++ b/MHCustomTabBarController.podspec @@ -11,7 +11,7 @@ Pod::Spec.new do |s| 'Martin Hartl' => 'martin@mhaddl.me' } s.source = { - :git => 'https://github.com/schmidt9/MHCustomTabBarController.git, + :git => 'https://github.com/schmidt9/MHCustomTabBarController.git', :tag => 'v1.3.0' } s.source_files = 'MHCustomTabBarController/*.{m,h}'