From be56a9ae4ff97c35029f2362b843fc323ed12610 Mon Sep 17 00:00:00 2001 From: ltebean Date: Sat, 2 May 2015 12:14:19 +0800 Subject: [PATCH 01/28] update demo to display section header --- LTNavigationBar/BGColorDemoViewController.m | 9 +++++-- LTNavigationBar/Base.lproj/Main.storyboard | 28 +++++++++++++++------ 2 files changed, 27 insertions(+), 10 deletions(-) diff --git a/LTNavigationBar/BGColorDemoViewController.m b/LTNavigationBar/BGColorDemoViewController.m index 32bada3..d2b5301 100644 --- a/LTNavigationBar/BGColorDemoViewController.m +++ b/LTNavigationBar/BGColorDemoViewController.m @@ -56,14 +56,19 @@ - (void)viewWillDisappear:(BOOL)animated #pragma mark UITableViewDatasource +- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section +{ + return @"header"; +} + - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { - return 10; + return 5; } - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { - return 1; + return 5; } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath diff --git a/LTNavigationBar/Base.lproj/Main.storyboard b/LTNavigationBar/Base.lproj/Main.storyboard index 83a3a8e..67445e9 100644 --- a/LTNavigationBar/Base.lproj/Main.storyboard +++ b/LTNavigationBar/Base.lproj/Main.storyboard @@ -8,22 +8,34 @@ - + - + - - + + - - + + - + + + + + + + + + + + + + @@ -45,8 +57,8 @@ + - From 47a1e8983e648accb3a740b1c00ab5caa7e8a472 Mon Sep 17 00:00:00 2001 From: ltebean Date: Sat, 2 May 2015 12:22:36 +0800 Subject: [PATCH 02/28] check bar height when init the overlay --- LTNavigationBar.podspec | 4 ++-- LTNavigationBar/Info.plist | 6 +++--- LTNavigationBar/UINavigationBar+Awesome.m | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/LTNavigationBar.podspec b/LTNavigationBar.podspec index 77098fa..1da3f47 100644 --- a/LTNavigationBar.podspec +++ b/LTNavigationBar.podspec @@ -1,12 +1,12 @@ Pod::Spec.new do |s| s.name = "LTNavigationBar" - s.version = "2.0.2" + s.version = "2.0.3" s.summary = "UINavigationBar Category which allows you to change its appearance dynamically" s.homepage = "https://github.com/ltebean/LTNavigationbar" s.license = "MIT" s.author = { "ltebean" => "yucong1118@gmail.com" } - s.source = { :git => "https://github.com/ltebean/LTNavigationbar.git", :tag => 'v2.0.2'} + s.source = { :git => "https://github.com/ltebean/LTNavigationbar.git", :tag => 'v2.0.3'} s.source_files = "LTNavigationbar/UINavigationBar+Awesome.{h,m}" s.requires_arc = true s.platform = :ios, '7.0' diff --git a/LTNavigationBar/Info.plist b/LTNavigationBar/Info.plist index de59cfc..aac453c 100644 --- a/LTNavigationBar/Info.plist +++ b/LTNavigationBar/Info.plist @@ -30,13 +30,13 @@ armv7 - UIViewControllerBasedStatusBarAppearance - UISupportedInterfaceOrientations - UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight + UIInterfaceOrientationPortrait + UIViewControllerBasedStatusBarAppearance + diff --git a/LTNavigationBar/UINavigationBar+Awesome.m b/LTNavigationBar/UINavigationBar+Awesome.m index 15e6ac9..e2f0911 100644 --- a/LTNavigationBar/UINavigationBar+Awesome.m +++ b/LTNavigationBar/UINavigationBar+Awesome.m @@ -37,7 +37,7 @@ - (void)lt_setBackgroundColor:(UIColor *)backgroundColor { if (!self.overlay) { [self setBackgroundImage:[UIImage new] forBarMetrics:UIBarMetricsDefault]; - self.overlay = [[UIView alloc] initWithFrame:CGRectMake(0, -20, [UIScreen mainScreen].bounds.size.width, 64)]; + self.overlay = [[UIView alloc] initWithFrame:CGRectMake(0, -20, [UIScreen mainScreen].bounds.size.width, CGRectGetHeight(self.bounds) + 20)]; self.overlay.userInteractionEnabled = NO; self.overlay.autoresizingMask = UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleHeight; [self insertSubview:self.overlay atIndex:0]; From 8bec685468586516a2776ad9411ea311e1305a3a Mon Sep 17 00:00:00 2001 From: ltebean Date: Fri, 3 Jul 2015 21:41:23 +0800 Subject: [PATCH 03/28] fix demo - scrollViewDidScroll will get called when view is not visible --- LTNavigationBar/BGColorDemoViewController.m | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/LTNavigationBar/BGColorDemoViewController.m b/LTNavigationBar/BGColorDemoViewController.m index d2b5301..87cca77 100644 --- a/LTNavigationBar/BGColorDemoViewController.m +++ b/LTNavigationBar/BGColorDemoViewController.m @@ -20,8 +20,6 @@ @implementation BGColorDemoViewController - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view, typically from a nib. - - self.tableView.delegate = self; self.tableView.dataSource = self; [self.tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:@"Cell"]; [self.navigationController.navigationBar lt_setBackgroundColor:[UIColor clearColor]]; @@ -32,8 +30,7 @@ - (void)scrollViewDidScroll:(UIScrollView *)scrollView UIColor * color = [UIColor colorWithRed:0/255.0 green:175/255.0 blue:240/255.0 alpha:1]; CGFloat offsetY = scrollView.contentOffset.y; if (offsetY > NAVBAR_CHANGE_POINT) { - CGFloat alpha = 1 - ((NAVBAR_CHANGE_POINT + 64 - offsetY) / 64); - + CGFloat alpha = MIN(1, 1 - ((NAVBAR_CHANGE_POINT + 64 - offsetY) / 64)); [self.navigationController.navigationBar lt_setBackgroundColor:[color colorWithAlphaComponent:alpha]]; } else { [self.navigationController.navigationBar lt_setBackgroundColor:[color colorWithAlphaComponent:0]]; @@ -43,14 +40,15 @@ - (void)scrollViewDidScroll:(UIScrollView *)scrollView - (void)viewWillAppear:(BOOL)animated { [super viewWillAppear:YES]; + self.tableView.delegate = self; [self scrollViewDidScroll:self.tableView]; [self.navigationController.navigationBar setShadowImage:[UIImage new]]; - } - (void)viewWillDisappear:(BOOL)animated { [super viewWillDisappear:animated]; + self.tableView.delegate = nil; [self.navigationController.navigationBar lt_reset]; } From 02400558af3d039d5c5258f6ce7e7a4547232b46 Mon Sep 17 00:00:00 2001 From: ltebean Date: Fri, 3 Jul 2015 21:41:42 +0800 Subject: [PATCH 04/28] not touch shadow image --- LTNavigationBar/UINavigationBar+Awesome.m | 2 -- 1 file changed, 2 deletions(-) diff --git a/LTNavigationBar/UINavigationBar+Awesome.m b/LTNavigationBar/UINavigationBar+Awesome.m index e2f0911..b948b37 100644 --- a/LTNavigationBar/UINavigationBar+Awesome.m +++ b/LTNavigationBar/UINavigationBar+Awesome.m @@ -78,8 +78,6 @@ - (void)setAlpha:(CGFloat)alpha forSubviewsOfView:(UIView *)view - (void)lt_reset { [self setBackgroundImage:nil forBarMetrics:UIBarMetricsDefault]; - [self setShadowImage:nil]; - [self.overlay removeFromSuperview]; self.overlay = nil; } From d6b1553be511f81e423895906fbb220f8ce5ab0d Mon Sep 17 00:00:00 2001 From: ltebean Date: Wed, 12 Aug 2015 16:03:00 +0800 Subject: [PATCH 05/28] fix setElementsAlpha --- LTNavigationBar.podspec | 4 +- LTNavigationBar/Info.plist | 2 - .../ScrollingNavbarDemoViewController.m | 2 +- LTNavigationBar/UINavigationBar+Awesome.h | 2 +- LTNavigationBar/UINavigationBar+Awesome.m | 44 +++++-------------- README.md | 2 +- 6 files changed, 16 insertions(+), 40 deletions(-) diff --git a/LTNavigationBar.podspec b/LTNavigationBar.podspec index 1da3f47..746d5ad 100644 --- a/LTNavigationBar.podspec +++ b/LTNavigationBar.podspec @@ -1,12 +1,12 @@ Pod::Spec.new do |s| s.name = "LTNavigationBar" - s.version = "2.0.3" + s.version = "2.1.0" s.summary = "UINavigationBar Category which allows you to change its appearance dynamically" s.homepage = "https://github.com/ltebean/LTNavigationbar" s.license = "MIT" s.author = { "ltebean" => "yucong1118@gmail.com" } - s.source = { :git => "https://github.com/ltebean/LTNavigationbar.git", :tag => 'v2.0.3'} + s.source = { :git => "https://github.com/ltebean/LTNavigationbar.git", :tag => 'v2.1.0'} s.source_files = "LTNavigationbar/UINavigationBar+Awesome.{h,m}" s.requires_arc = true s.platform = :ios, '7.0' diff --git a/LTNavigationBar/Info.plist b/LTNavigationBar/Info.plist index aac453c..c5e0609 100644 --- a/LTNavigationBar/Info.plist +++ b/LTNavigationBar/Info.plist @@ -32,8 +32,6 @@ UISupportedInterfaceOrientations - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait UIViewControllerBasedStatusBarAppearance diff --git a/LTNavigationBar/ScrollingNavbarDemoViewController.m b/LTNavigationBar/ScrollingNavbarDemoViewController.m index 9fe889e..eaa8548 100644 --- a/LTNavigationBar/ScrollingNavbarDemoViewController.m +++ b/LTNavigationBar/ScrollingNavbarDemoViewController.m @@ -41,7 +41,7 @@ - (void)scrollViewDidScroll:(UIScrollView *)scrollView - (void)setNavigationBarTransformProgress:(CGFloat)progress { [self.navigationController.navigationBar lt_setTranslationY:(-44 * progress)]; - [self.navigationController.navigationBar lt_setContentAlpha:(1-progress)]; + [self.navigationController.navigationBar lt_setElementsAlpha:(1-progress)]; } - (void)viewWillAppear:(BOOL)animated diff --git a/LTNavigationBar/UINavigationBar+Awesome.h b/LTNavigationBar/UINavigationBar+Awesome.h index c224e27..77e02fe 100644 --- a/LTNavigationBar/UINavigationBar+Awesome.h +++ b/LTNavigationBar/UINavigationBar+Awesome.h @@ -10,7 +10,7 @@ @interface UINavigationBar (Awesome) - (void)lt_setBackgroundColor:(UIColor *)backgroundColor; -- (void)lt_setContentAlpha:(CGFloat)alpha; +- (void)lt_setElementsAlpha:(CGFloat)alpha; - (void)lt_setTranslationY:(CGFloat)translationY; - (void)lt_reset; @end diff --git a/LTNavigationBar/UINavigationBar+Awesome.m b/LTNavigationBar/UINavigationBar+Awesome.m index b948b37..d3f8f48 100644 --- a/LTNavigationBar/UINavigationBar+Awesome.m +++ b/LTNavigationBar/UINavigationBar+Awesome.m @@ -11,7 +11,6 @@ @implementation UINavigationBar (Awesome) static char overlayKey; -static char emptyImageKey; - (UIView *)overlay { @@ -23,16 +22,6 @@ - (void)setOverlay:(UIView *)overlay objc_setAssociatedObject(self, &overlayKey, overlay, OBJC_ASSOCIATION_RETAIN_NONATOMIC); } -- (UIImage *)emptyImage -{ - return objc_getAssociatedObject(self, &emptyImageKey); -} - -- (void)setEmptyImage:(UIImage *)image -{ - objc_setAssociatedObject(self, &emptyImageKey, image, OBJC_ASSOCIATION_RETAIN_NONATOMIC); -} - - (void)lt_setBackgroundColor:(UIColor *)backgroundColor { if (!self.overlay) { @@ -50,29 +39,18 @@ - (void)lt_setTranslationY:(CGFloat)translationY self.transform = CGAffineTransformMakeTranslation(0, translationY); } -- (void)lt_setContentAlpha:(CGFloat)alpha +- (void)lt_setElementsAlpha:(CGFloat)alpha { - if (!self.overlay) { - [self lt_setBackgroundColor:self.barTintColor]; - } - [self setAlpha:alpha forSubviewsOfView:self]; - if (alpha == 1) { - if (!self.emptyImage) { - self.emptyImage = [UIImage new]; - } - self.backIndicatorImage = self.emptyImage; - } -} - -- (void)setAlpha:(CGFloat)alpha forSubviewsOfView:(UIView *)view -{ - for (UIView *subview in view.subviews) { - if (subview == self.overlay) { - continue; - } - subview.alpha = alpha; - [self setAlpha:alpha forSubviewsOfView:subview]; - } + [[self valueForKey:@"_leftViews"] enumerateObjectsUsingBlock:^(UIView *view, NSUInteger i, BOOL *stop) { + view.alpha = alpha; + }]; + + [[self valueForKey:@"_rightViews"] enumerateObjectsUsingBlock:^(UIView *view, NSUInteger i, BOOL *stop) { + view.alpha = alpha; + }]; + + UIView *titleView = [self valueForKey:@"_titleView"]; + titleView.alpha = alpha; } - (void)lt_reset diff --git a/README.md b/README.md index 22d1aa3..cfb55fd 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ The category includes lots of method that helps to change UINavigationBar's appe ```objective-c @interface UINavigationBar (Awesome) - (void)lt_setBackgroundColor:(UIColor *)backgroundColor; -- (void)lt_setContentAlpha:(CGFloat)alpha; +- (void)lt_setElementsAlpha:(CGFloat)alpha; - (void)lt_setTranslationY:(CGFloat)translationY; - (void)lt_reset; @end From c9aa5933364e49d0e61f9dd8a05cca3e8fbf8543 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=20=E5=8E=9F=E9=97=AF?= Date: Thu, 19 Nov 2015 13:25:15 +0800 Subject: [PATCH 06/28] fix a view_controller's first load --- LTNavigationBar/UINavigationBar+Awesome.m | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/LTNavigationBar/UINavigationBar+Awesome.m b/LTNavigationBar/UINavigationBar+Awesome.m index d3f8f48..52a95de 100644 --- a/LTNavigationBar/UINavigationBar+Awesome.m +++ b/LTNavigationBar/UINavigationBar+Awesome.m @@ -51,6 +51,13 @@ - (void)lt_setElementsAlpha:(CGFloat)alpha UIView *titleView = [self valueForKey:@"_titleView"]; titleView.alpha = alpha; +// when viewController first load, the titleView maybe nil + [[self subviews] enumerateObjectsUsingBlock:^(UIView *obj, NSUInteger idx, BOOL *stop) { + if ([obj isKindOfClass:NSClassFromString(@"UINavigationItemView")]) { + obj.alpha = alpha; + *stop = YES; + } + }]; } - (void)lt_reset From 8c5c26c30e70b1c635ad6ccae39540b916b914fa Mon Sep 17 00:00:00 2001 From: ltebean Date: Thu, 19 Nov 2015 15:07:36 +0800 Subject: [PATCH 07/28] update version --- LTNavigationBar.podspec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/LTNavigationBar.podspec b/LTNavigationBar.podspec index 746d5ad..93bf497 100644 --- a/LTNavigationBar.podspec +++ b/LTNavigationBar.podspec @@ -1,12 +1,12 @@ Pod::Spec.new do |s| s.name = "LTNavigationBar" - s.version = "2.1.0" + s.version = "2.1.1" s.summary = "UINavigationBar Category which allows you to change its appearance dynamically" s.homepage = "https://github.com/ltebean/LTNavigationbar" s.license = "MIT" s.author = { "ltebean" => "yucong1118@gmail.com" } - s.source = { :git => "https://github.com/ltebean/LTNavigationbar.git", :tag => 'v2.1.0'} + s.source = { :git => "https://github.com/ltebean/LTNavigationbar.git", :tag => 'v2.1.1'} s.source_files = "LTNavigationbar/UINavigationBar+Awesome.{h,m}" s.requires_arc = true s.platform = :ios, '7.0' From cda6b01e6ea2ec397468a3b5d66ebcd7143b6dc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Czwarnowski?= Date: Mon, 22 Feb 2016 11:13:49 +0100 Subject: [PATCH 08/28] Change width in frame for overlay view --- LTNavigationBar/UINavigationBar+Awesome.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LTNavigationBar/UINavigationBar+Awesome.m b/LTNavigationBar/UINavigationBar+Awesome.m index 52a95de..4c51f40 100644 --- a/LTNavigationBar/UINavigationBar+Awesome.m +++ b/LTNavigationBar/UINavigationBar+Awesome.m @@ -26,7 +26,7 @@ - (void)lt_setBackgroundColor:(UIColor *)backgroundColor { if (!self.overlay) { [self setBackgroundImage:[UIImage new] forBarMetrics:UIBarMetricsDefault]; - self.overlay = [[UIView alloc] initWithFrame:CGRectMake(0, -20, [UIScreen mainScreen].bounds.size.width, CGRectGetHeight(self.bounds) + 20)]; + self.overlay = [[UIView alloc] initWithFrame:CGRectMake(0, -20, CGRectGetWidth(self.bounds), CGRectGetHeight(self.bounds) + 20)]; self.overlay.userInteractionEnabled = NO; self.overlay.autoresizingMask = UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleHeight; [self insertSubview:self.overlay atIndex:0]; From 944de8c69476920153a0ebc9468891b1a164cc61 Mon Sep 17 00:00:00 2001 From: ltebean Date: Tue, 23 Feb 2016 11:11:33 +0800 Subject: [PATCH 09/28] update version --- LTNavigationBar.podspec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/LTNavigationBar.podspec b/LTNavigationBar.podspec index 93bf497..72c3704 100644 --- a/LTNavigationBar.podspec +++ b/LTNavigationBar.podspec @@ -1,12 +1,12 @@ Pod::Spec.new do |s| s.name = "LTNavigationBar" - s.version = "2.1.1" + s.version = "2.1.2" s.summary = "UINavigationBar Category which allows you to change its appearance dynamically" s.homepage = "https://github.com/ltebean/LTNavigationbar" s.license = "MIT" s.author = { "ltebean" => "yucong1118@gmail.com" } - s.source = { :git => "https://github.com/ltebean/LTNavigationbar.git", :tag => 'v2.1.1'} + s.source = { :git => "https://github.com/ltebean/LTNavigationbar.git", :tag => 'v2.1.2'} s.source_files = "LTNavigationbar/UINavigationBar+Awesome.{h,m}" s.requires_arc = true s.platform = :ios, '7.0' From 5db4c033ab89b174d58640fe4fcfacfd689f8201 Mon Sep 17 00:00:00 2001 From: Wayne Date: Thu, 18 Aug 2016 20:32:05 +0800 Subject: [PATCH 10/28] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20NavigationBar=20titl?= =?UTF-8?q?e=20=E5=9C=A8=20iOS=2010=20=E7=B3=BB=E7=BB=9F=E4=B8=8B=E4=B8=8D?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E7=9A=84=20BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- LTNavigationBar.xcodeproj/project.pbxproj | 2 ++ LTNavigationBar/UINavigationBar+Awesome.m | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/LTNavigationBar.xcodeproj/project.pbxproj b/LTNavigationBar.xcodeproj/project.pbxproj index 3958689..620d1a9 100644 --- a/LTNavigationBar.xcodeproj/project.pbxproj +++ b/LTNavigationBar.xcodeproj/project.pbxproj @@ -375,6 +375,7 @@ isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + DEVELOPMENT_TEAM = ""; INFOPLIST_FILE = LTNavigationBar/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -385,6 +386,7 @@ isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + DEVELOPMENT_TEAM = ""; INFOPLIST_FILE = LTNavigationBar/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_NAME = "$(TARGET_NAME)"; diff --git a/LTNavigationBar/UINavigationBar+Awesome.m b/LTNavigationBar/UINavigationBar+Awesome.m index 4c51f40..0ada7a2 100644 --- a/LTNavigationBar/UINavigationBar+Awesome.m +++ b/LTNavigationBar/UINavigationBar+Awesome.m @@ -26,10 +26,10 @@ - (void)lt_setBackgroundColor:(UIColor *)backgroundColor { if (!self.overlay) { [self setBackgroundImage:[UIImage new] forBarMetrics:UIBarMetricsDefault]; - self.overlay = [[UIView alloc] initWithFrame:CGRectMake(0, -20, CGRectGetWidth(self.bounds), CGRectGetHeight(self.bounds) + 20)]; + self.overlay = [[UIView alloc] initWithFrame:CGRectMake(0, 0, CGRectGetWidth(self.bounds), CGRectGetHeight(self.bounds) + 20)]; self.overlay.userInteractionEnabled = NO; self.overlay.autoresizingMask = UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleHeight; - [self insertSubview:self.overlay atIndex:0]; + [[self.subviews firstObject] insertSubview:self.overlay atIndex:0]; } self.overlay.backgroundColor = backgroundColor; } From 207f9b65981165907ae47dba0a6e258e8041df54 Mon Sep 17 00:00:00 2001 From: ltebean Date: Fri, 19 Aug 2016 10:01:17 +0800 Subject: [PATCH 11/28] bump version --- LTNavigationBar.podspec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/LTNavigationBar.podspec b/LTNavigationBar.podspec index 72c3704..3c1b4f6 100644 --- a/LTNavigationBar.podspec +++ b/LTNavigationBar.podspec @@ -1,12 +1,12 @@ Pod::Spec.new do |s| s.name = "LTNavigationBar" - s.version = "2.1.2" + s.version = "2.1.3" s.summary = "UINavigationBar Category which allows you to change its appearance dynamically" s.homepage = "https://github.com/ltebean/LTNavigationbar" s.license = "MIT" s.author = { "ltebean" => "yucong1118@gmail.com" } - s.source = { :git => "https://github.com/ltebean/LTNavigationbar.git", :tag => 'v2.1.2'} + s.source = { :git => "https://github.com/ltebean/LTNavigationbar.git", :tag => 'v2.1.3'} s.source_files = "LTNavigationbar/UINavigationBar+Awesome.{h,m}" s.requires_arc = true s.platform = :ios, '7.0' From 85a6c36dd47f29c48db3e14e010edd29258b4570 Mon Sep 17 00:00:00 2001 From: ltebean Date: Mon, 22 Aug 2016 08:07:51 +0800 Subject: [PATCH 12/28] check iOS version --- LTNavigationBar.podspec | 4 ++-- LTNavigationBar/UINavigationBar+Awesome.m | 9 ++++++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/LTNavigationBar.podspec b/LTNavigationBar.podspec index 3c1b4f6..c7f93ca 100644 --- a/LTNavigationBar.podspec +++ b/LTNavigationBar.podspec @@ -1,12 +1,12 @@ Pod::Spec.new do |s| s.name = "LTNavigationBar" - s.version = "2.1.3" + s.version = "2.1.4" s.summary = "UINavigationBar Category which allows you to change its appearance dynamically" s.homepage = "https://github.com/ltebean/LTNavigationbar" s.license = "MIT" s.author = { "ltebean" => "yucong1118@gmail.com" } - s.source = { :git => "https://github.com/ltebean/LTNavigationbar.git", :tag => 'v2.1.3'} + s.source = { :git => "https://github.com/ltebean/LTNavigationbar.git", :tag => 'v2.1.4'} s.source_files = "LTNavigationbar/UINavigationBar+Awesome.{h,m}" s.requires_arc = true s.platform = :ios, '7.0' diff --git a/LTNavigationBar/UINavigationBar+Awesome.m b/LTNavigationBar/UINavigationBar+Awesome.m index 0ada7a2..155d1e2 100644 --- a/LTNavigationBar/UINavigationBar+Awesome.m +++ b/LTNavigationBar/UINavigationBar+Awesome.m @@ -9,6 +9,8 @@ #import "UINavigationBar+Awesome.h" #import +#define SYSTEM_VERSION_LESS_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedAscending) + @implementation UINavigationBar (Awesome) static char overlayKey; @@ -26,7 +28,12 @@ - (void)lt_setBackgroundColor:(UIColor *)backgroundColor { if (!self.overlay) { [self setBackgroundImage:[UIImage new] forBarMetrics:UIBarMetricsDefault]; - self.overlay = [[UIView alloc] initWithFrame:CGRectMake(0, 0, CGRectGetWidth(self.bounds), CGRectGetHeight(self.bounds) + 20)]; + if (SYSTEM_VERSION_LESS_THAN(@"10.0")) { + self.overlay = [[UIView alloc] initWithFrame:CGRectMake(0, -20, CGRectGetWidth(self.bounds), CGRectGetHeight(self.bounds) + 20)]; + } else { + self.overlay = [[UIView alloc] initWithFrame:CGRectMake(0, 0, CGRectGetWidth(self.bounds), CGRectGetHeight(self.bounds) + 20)]; + } + self.overlay.userInteractionEnabled = NO; self.overlay.autoresizingMask = UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleHeight; [[self.subviews firstObject] insertSubview:self.overlay atIndex:0]; From 1907f14bdec162627b67ecda5053262d98abd97f Mon Sep 17 00:00:00 2001 From: ltebean Date: Mon, 22 Aug 2016 18:10:22 +0800 Subject: [PATCH 13/28] fix overlay height --- LTNavigationBar.podspec | 4 ++-- LTNavigationBar/UINavigationBar+Awesome.m | 7 ++----- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/LTNavigationBar.podspec b/LTNavigationBar.podspec index c7f93ca..76105b8 100644 --- a/LTNavigationBar.podspec +++ b/LTNavigationBar.podspec @@ -1,12 +1,12 @@ Pod::Spec.new do |s| s.name = "LTNavigationBar" - s.version = "2.1.4" + s.version = "2.1.5" s.summary = "UINavigationBar Category which allows you to change its appearance dynamically" s.homepage = "https://github.com/ltebean/LTNavigationbar" s.license = "MIT" s.author = { "ltebean" => "yucong1118@gmail.com" } - s.source = { :git => "https://github.com/ltebean/LTNavigationbar.git", :tag => 'v2.1.4'} + s.source = { :git => "https://github.com/ltebean/LTNavigationbar.git", :tag => 'v2.1.5'} s.source_files = "LTNavigationbar/UINavigationBar+Awesome.{h,m}" s.requires_arc = true s.platform = :ios, '7.0' diff --git a/LTNavigationBar/UINavigationBar+Awesome.m b/LTNavigationBar/UINavigationBar+Awesome.m index 155d1e2..a97e474 100644 --- a/LTNavigationBar/UINavigationBar+Awesome.m +++ b/LTNavigationBar/UINavigationBar+Awesome.m @@ -28,11 +28,8 @@ - (void)lt_setBackgroundColor:(UIColor *)backgroundColor { if (!self.overlay) { [self setBackgroundImage:[UIImage new] forBarMetrics:UIBarMetricsDefault]; - if (SYSTEM_VERSION_LESS_THAN(@"10.0")) { - self.overlay = [[UIView alloc] initWithFrame:CGRectMake(0, -20, CGRectGetWidth(self.bounds), CGRectGetHeight(self.bounds) + 20)]; - } else { - self.overlay = [[UIView alloc] initWithFrame:CGRectMake(0, 0, CGRectGetWidth(self.bounds), CGRectGetHeight(self.bounds) + 20)]; - } + + self.overlay = [[UIView alloc] initWithFrame:CGRectMake(0, 0, CGRectGetWidth(self.bounds), CGRectGetHeight(self.bounds) + 20)]; self.overlay.userInteractionEnabled = NO; self.overlay.autoresizingMask = UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleHeight; From e29713d4d5ec1dd20861a29e1497fa94d763e013 Mon Sep 17 00:00:00 2001 From: Wayne Date: Sat, 27 Aug 2016 18:15:09 +0800 Subject: [PATCH 14/28] Fix issue 44 --- LTNavigationBar/UINavigationBar+Awesome.m | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/LTNavigationBar/UINavigationBar+Awesome.m b/LTNavigationBar/UINavigationBar+Awesome.m index a97e474..b99f80d 100644 --- a/LTNavigationBar/UINavigationBar+Awesome.m +++ b/LTNavigationBar/UINavigationBar+Awesome.m @@ -28,11 +28,9 @@ - (void)lt_setBackgroundColor:(UIColor *)backgroundColor { if (!self.overlay) { [self setBackgroundImage:[UIImage new] forBarMetrics:UIBarMetricsDefault]; - self.overlay = [[UIView alloc] initWithFrame:CGRectMake(0, 0, CGRectGetWidth(self.bounds), CGRectGetHeight(self.bounds) + 20)]; - self.overlay.userInteractionEnabled = NO; - self.overlay.autoresizingMask = UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleHeight; + self.overlay.autoresizingMask = UIViewAutoresizingFlexibleWidth; // Should not set `UIViewAutoresizingFlexibleHeight` [[self.subviews firstObject] insertSubview:self.overlay atIndex:0]; } self.overlay.backgroundColor = backgroundColor; From 7be19f8af1f51171b72f65a41314f5914b9a0180 Mon Sep 17 00:00:00 2001 From: ltebean Date: Sun, 28 Aug 2016 19:20:19 +0800 Subject: [PATCH 15/28] bump version --- LTNavigationBar.podspec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/LTNavigationBar.podspec b/LTNavigationBar.podspec index 76105b8..bff99a8 100644 --- a/LTNavigationBar.podspec +++ b/LTNavigationBar.podspec @@ -1,12 +1,12 @@ Pod::Spec.new do |s| s.name = "LTNavigationBar" - s.version = "2.1.5" + s.version = "2.1.6" s.summary = "UINavigationBar Category which allows you to change its appearance dynamically" s.homepage = "https://github.com/ltebean/LTNavigationbar" s.license = "MIT" s.author = { "ltebean" => "yucong1118@gmail.com" } - s.source = { :git => "https://github.com/ltebean/LTNavigationbar.git", :tag => 'v2.1.5'} + s.source = { :git => "https://github.com/ltebean/LTNavigationbar.git", :tag => 'v2.1.6'} s.source_files = "LTNavigationbar/UINavigationBar+Awesome.{h,m}" s.requires_arc = true s.platform = :ios, '7.0' From 3a60069e0d70308c8627878cbf2a6ecedc9508e4 Mon Sep 17 00:00:00 2001 From: Vian Date: Thu, 1 Sep 2016 11:24:02 +0800 Subject: [PATCH 16/28] Update UINavigationBar+Awesome.m overlay offset y is -20 not 0 --- LTNavigationBar/UINavigationBar+Awesome.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LTNavigationBar/UINavigationBar+Awesome.m b/LTNavigationBar/UINavigationBar+Awesome.m index b99f80d..7d9bc1b 100644 --- a/LTNavigationBar/UINavigationBar+Awesome.m +++ b/LTNavigationBar/UINavigationBar+Awesome.m @@ -28,7 +28,7 @@ - (void)lt_setBackgroundColor:(UIColor *)backgroundColor { if (!self.overlay) { [self setBackgroundImage:[UIImage new] forBarMetrics:UIBarMetricsDefault]; - self.overlay = [[UIView alloc] initWithFrame:CGRectMake(0, 0, CGRectGetWidth(self.bounds), CGRectGetHeight(self.bounds) + 20)]; + self.overlay = [[UIView alloc] initWithFrame:CGRectMake(0, -20, CGRectGetWidth(self.bounds), CGRectGetHeight(self.bounds) + 20)]; self.overlay.userInteractionEnabled = NO; self.overlay.autoresizingMask = UIViewAutoresizingFlexibleWidth; // Should not set `UIViewAutoresizingFlexibleHeight` [[self.subviews firstObject] insertSubview:self.overlay atIndex:0]; From 6899c590cc191bc04c8645007fee1641ef7dc31e Mon Sep 17 00:00:00 2001 From: ltebean Date: Fri, 2 Sep 2016 21:16:59 +0800 Subject: [PATCH 17/28] bump version --- LTNavigationBar.podspec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/LTNavigationBar.podspec b/LTNavigationBar.podspec index bff99a8..1c1eba7 100644 --- a/LTNavigationBar.podspec +++ b/LTNavigationBar.podspec @@ -1,12 +1,12 @@ Pod::Spec.new do |s| s.name = "LTNavigationBar" - s.version = "2.1.6" + s.version = "2.1.7" s.summary = "UINavigationBar Category which allows you to change its appearance dynamically" s.homepage = "https://github.com/ltebean/LTNavigationbar" s.license = "MIT" s.author = { "ltebean" => "yucong1118@gmail.com" } - s.source = { :git => "https://github.com/ltebean/LTNavigationbar.git", :tag => 'v2.1.6'} + s.source = { :git => "https://github.com/ltebean/LTNavigationbar.git", :tag => 'v2.1.7'} s.source_files = "LTNavigationbar/UINavigationBar+Awesome.{h,m}" s.requires_arc = true s.platform = :ios, '7.0' From 4b89685217bbeba6021bce9b5dc4f0896241e144 Mon Sep 17 00:00:00 2001 From: ltebean Date: Fri, 2 Sep 2016 22:42:23 +0800 Subject: [PATCH 18/28] Revert "bump version" This reverts commit 6899c590cc191bc04c8645007fee1641ef7dc31e. --- LTNavigationBar.podspec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/LTNavigationBar.podspec b/LTNavigationBar.podspec index 1c1eba7..bff99a8 100644 --- a/LTNavigationBar.podspec +++ b/LTNavigationBar.podspec @@ -1,12 +1,12 @@ Pod::Spec.new do |s| s.name = "LTNavigationBar" - s.version = "2.1.7" + s.version = "2.1.6" s.summary = "UINavigationBar Category which allows you to change its appearance dynamically" s.homepage = "https://github.com/ltebean/LTNavigationbar" s.license = "MIT" s.author = { "ltebean" => "yucong1118@gmail.com" } - s.source = { :git => "https://github.com/ltebean/LTNavigationbar.git", :tag => 'v2.1.7'} + s.source = { :git => "https://github.com/ltebean/LTNavigationbar.git", :tag => 'v2.1.6'} s.source_files = "LTNavigationbar/UINavigationBar+Awesome.{h,m}" s.requires_arc = true s.platform = :ios, '7.0' From 5c20c89373d6ba18e071915e345d38eff1d78111 Mon Sep 17 00:00:00 2001 From: ltebean Date: Fri, 2 Sep 2016 22:43:07 +0800 Subject: [PATCH 19/28] fix --- LTNavigationBar/UINavigationBar+Awesome.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LTNavigationBar/UINavigationBar+Awesome.m b/LTNavigationBar/UINavigationBar+Awesome.m index 7d9bc1b..b99f80d 100644 --- a/LTNavigationBar/UINavigationBar+Awesome.m +++ b/LTNavigationBar/UINavigationBar+Awesome.m @@ -28,7 +28,7 @@ - (void)lt_setBackgroundColor:(UIColor *)backgroundColor { if (!self.overlay) { [self setBackgroundImage:[UIImage new] forBarMetrics:UIBarMetricsDefault]; - self.overlay = [[UIView alloc] initWithFrame:CGRectMake(0, -20, CGRectGetWidth(self.bounds), CGRectGetHeight(self.bounds) + 20)]; + self.overlay = [[UIView alloc] initWithFrame:CGRectMake(0, 0, CGRectGetWidth(self.bounds), CGRectGetHeight(self.bounds) + 20)]; self.overlay.userInteractionEnabled = NO; self.overlay.autoresizingMask = UIViewAutoresizingFlexibleWidth; // Should not set `UIViewAutoresizingFlexibleHeight` [[self.subviews firstObject] insertSubview:self.overlay atIndex:0]; From 3059bf15c53055d24c6f76a70c6e7059d84c5db6 Mon Sep 17 00:00:00 2001 From: Rawlings Date: Fri, 9 Dec 2016 00:59:17 +0800 Subject: [PATCH 20/28] fix: BackButton / BackIndicatorView when lt_setElementsAlpha --- LTNavigationBar/UINavigationBar+Awesome.m | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/LTNavigationBar/UINavigationBar+Awesome.m b/LTNavigationBar/UINavigationBar+Awesome.m index b99f80d..14f931c 100644 --- a/LTNavigationBar/UINavigationBar+Awesome.m +++ b/LTNavigationBar/UINavigationBar+Awesome.m @@ -57,7 +57,9 @@ - (void)lt_setElementsAlpha:(CGFloat)alpha [[self subviews] enumerateObjectsUsingBlock:^(UIView *obj, NSUInteger idx, BOOL *stop) { if ([obj isKindOfClass:NSClassFromString(@"UINavigationItemView")]) { obj.alpha = alpha; - *stop = YES; + } + if ([obj isKindOfClass:NSClassFromString(@"_UINavigationBarBackIndicatorView")]) { + obj.alpha = obj.alpha == 0 ? 0 : alpha; } }]; } From 1fa8b19d780767f20e6b89598ae4c8d05b4dd7f0 Mon Sep 17 00:00:00 2001 From: Rawlings Date: Fri, 9 Dec 2016 03:08:18 +0800 Subject: [PATCH 21/28] add guidepost --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index cfb55fd..3126703 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,9 @@ ![LTNavigationbar](https://cocoapod-badges.herokuapp.com/v/LTNavigationBar/badge.png) +## swift version --> branch swift3.0 + +[https://github.com/ltebean/LTNavigationBar/tree/swift3.0](https://github.com/ltebean/LTNavigationBar/tree/swift3.0) + ## Purpose It is hard to change the appearance of UINavigationBar dynamically, so I made this lib to make the job easy. From ec5af9176a49fe62f3c9d5c573f053f51d2f7134 Mon Sep 17 00:00:00 2001 From: ltebean Date: Fri, 9 Dec 2016 20:45:05 +0800 Subject: [PATCH 22/28] update readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3126703..5e34c5e 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ ![LTNavigationbar](https://cocoapod-badges.herokuapp.com/v/LTNavigationBar/badge.png) -## swift version --> branch swift3.0 +## swift version [https://github.com/ltebean/LTNavigationBar/tree/swift3.0](https://github.com/ltebean/LTNavigationBar/tree/swift3.0) From 2eab40c9b4e55f616a951640e7140fd33c6bfd86 Mon Sep 17 00:00:00 2001 From: ltebean Date: Fri, 9 Dec 2016 20:45:44 +0800 Subject: [PATCH 23/28] bump version --- LTNavigationBar.podspec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/LTNavigationBar.podspec b/LTNavigationBar.podspec index bff99a8..1c1eba7 100644 --- a/LTNavigationBar.podspec +++ b/LTNavigationBar.podspec @@ -1,12 +1,12 @@ Pod::Spec.new do |s| s.name = "LTNavigationBar" - s.version = "2.1.6" + s.version = "2.1.7" s.summary = "UINavigationBar Category which allows you to change its appearance dynamically" s.homepage = "https://github.com/ltebean/LTNavigationbar" s.license = "MIT" s.author = { "ltebean" => "yucong1118@gmail.com" } - s.source = { :git => "https://github.com/ltebean/LTNavigationbar.git", :tag => 'v2.1.6'} + s.source = { :git => "https://github.com/ltebean/LTNavigationbar.git", :tag => 'v2.1.7'} s.source_files = "LTNavigationbar/UINavigationBar+Awesome.{h,m}" s.requires_arc = true s.platform = :ios, '7.0' From 8a262a923104c15bce32ed59905f11f1ee4d9f7f Mon Sep 17 00:00:00 2001 From: ltebean Date: Fri, 9 Dec 2016 20:46:40 +0800 Subject: [PATCH 24/28] bump version --- LTNavigationBar.podspec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/LTNavigationBar.podspec b/LTNavigationBar.podspec index 1c1eba7..3fdf2d3 100644 --- a/LTNavigationBar.podspec +++ b/LTNavigationBar.podspec @@ -1,12 +1,12 @@ Pod::Spec.new do |s| s.name = "LTNavigationBar" - s.version = "2.1.7" + s.version = "2.1.8" s.summary = "UINavigationBar Category which allows you to change its appearance dynamically" s.homepage = "https://github.com/ltebean/LTNavigationbar" s.license = "MIT" s.author = { "ltebean" => "yucong1118@gmail.com" } - s.source = { :git => "https://github.com/ltebean/LTNavigationbar.git", :tag => 'v2.1.7'} + s.source = { :git => "https://github.com/ltebean/LTNavigationbar.git", :tag => 'v2.1.8'} s.source_files = "LTNavigationbar/UINavigationBar+Awesome.{h,m}" s.requires_arc = true s.platform = :ios, '7.0' From eb7e02d50b86178571dc6d79f47db68b4060471b Mon Sep 17 00:00:00 2001 From: ltebean Date: Mon, 26 Dec 2016 11:42:50 +0800 Subject: [PATCH 25/28] fix back indicator view --- LTNavigationBar.podspec | 2 +- LTNavigationBar/UINavigationBar+Awesome.m | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/LTNavigationBar.podspec b/LTNavigationBar.podspec index 3fdf2d3..d081afa 100644 --- a/LTNavigationBar.podspec +++ b/LTNavigationBar.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |s| s.name = "LTNavigationBar" - s.version = "2.1.8" + s.version = "2.1.9" s.summary = "UINavigationBar Category which allows you to change its appearance dynamically" s.homepage = "https://github.com/ltebean/LTNavigationbar" s.license = "MIT" diff --git a/LTNavigationBar/UINavigationBar+Awesome.m b/LTNavigationBar/UINavigationBar+Awesome.m index 14f931c..10adb5b 100644 --- a/LTNavigationBar/UINavigationBar+Awesome.m +++ b/LTNavigationBar/UINavigationBar+Awesome.m @@ -59,7 +59,7 @@ - (void)lt_setElementsAlpha:(CGFloat)alpha obj.alpha = alpha; } if ([obj isKindOfClass:NSClassFromString(@"_UINavigationBarBackIndicatorView")]) { - obj.alpha = obj.alpha == 0 ? 0 : alpha; + obj.alpha = alpha; } }]; } From 4d58cf625c4bdee6577374b0108f844b3ba7437b Mon Sep 17 00:00:00 2001 From: ltebean Date: Mon, 26 Dec 2016 11:47:28 +0800 Subject: [PATCH 26/28] bump version --- LTNavigationBar.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LTNavigationBar.podspec b/LTNavigationBar.podspec index d081afa..3f4d229 100644 --- a/LTNavigationBar.podspec +++ b/LTNavigationBar.podspec @@ -6,7 +6,7 @@ Pod::Spec.new do |s| s.homepage = "https://github.com/ltebean/LTNavigationbar" s.license = "MIT" s.author = { "ltebean" => "yucong1118@gmail.com" } - s.source = { :git => "https://github.com/ltebean/LTNavigationbar.git", :tag => 'v2.1.8'} + s.source = { :git => "https://github.com/ltebean/LTNavigationbar.git", :tag => 'v2.1.9'} s.source_files = "LTNavigationbar/UINavigationBar+Awesome.{h,m}" s.requires_arc = true s.platform = :ios, '7.0' From 4ea637560a54a062b914892f58074b8d7b7ef2c9 Mon Sep 17 00:00:00 2001 From: Leo Date: Thu, 20 Jul 2017 10:26:16 +0800 Subject: [PATCH 27/28] Update README.md --- README.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 5e34c5e..78d7dae 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,10 @@ +## Deprecated +This lib uses a hacky way to achieve the result, in the new iOS version, the structure of UINavigation is changed and this lib no longer works anymore, so please check these alternatives: + +- https://github.com/andreamazz/AMScrollingNavbar +- https://github.com/DanisFabric/RainbowNavigation +- https://github.com/MoZhouqi/KMNavigationBarTransition + ![LTNavigationbar](https://cocoapod-badges.herokuapp.com/v/LTNavigationBar/badge.png) ## swift version @@ -47,4 +54,4 @@ And usually in `viewWillDisappear`, you should call this method to avoid any sid } ``` -See the example for details~ \ No newline at end of file +See the example for details~ From 2dbb42e416d8bccc87cee7e6a1a76343f993423f Mon Sep 17 00:00:00 2001 From: Leo Date: Thu, 20 Jul 2017 10:27:00 +0800 Subject: [PATCH 28/28] Update README.md --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 78d7dae..dada94a 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,6 @@ +![LTNavigationbar](https://cocoapod-badges.herokuapp.com/v/LTNavigationBar/badge.png) + + ## Deprecated This lib uses a hacky way to achieve the result, in the new iOS version, the structure of UINavigation is changed and this lib no longer works anymore, so please check these alternatives: @@ -5,7 +8,6 @@ This lib uses a hacky way to achieve the result, in the new iOS version, the str - https://github.com/DanisFabric/RainbowNavigation - https://github.com/MoZhouqi/KMNavigationBarTransition -![LTNavigationbar](https://cocoapod-badges.herokuapp.com/v/LTNavigationBar/badge.png) ## swift version