From a2f4e8448da2ca27068c03b65ad89d8f015062e5 Mon Sep 17 00:00:00 2001 From: Ilya Velilyaev Date: Thu, 3 Nov 2016 14:01:11 +0300 Subject: [PATCH] Fix unability to set clear background color --- .../UINavigationController+M13ProgressViewBar.m | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Classes/NavigationController/UINavigationController+M13ProgressViewBar.m b/Classes/NavigationController/UINavigationController+M13ProgressViewBar.m index 1754c83..ba0e7fd 100644 --- a/Classes/NavigationController/UINavigationController+M13ProgressViewBar.m +++ b/Classes/NavigationController/UINavigationController+M13ProgressViewBar.m @@ -185,12 +185,14 @@ - (void)updateProgressWithInterfaceOrientation:(UIInterfaceOrientation)interface if(!progressView) { progressView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 0, 2.5)]; - progressView.backgroundColor = self.navigationBar.tintColor; progressView.clipsToBounds = YES; [self setProgressView:progressView]; } + if ([self getPrimaryColor]) { progressView.backgroundColor = [self getPrimaryColor]; + } else { + progressView.backgroundColor = self.navigationBar.tintColor; } //Create background view if it doesn't exist @@ -198,12 +200,14 @@ - (void)updateProgressWithInterfaceOrientation:(UIInterfaceOrientation)interface if (!backgroundView) { backgroundView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 0, 2.5)]; - backgroundView.backgroundColor = [UIColor clearColor]; backgroundView.clipsToBounds = YES; [self setBackgroundView:backgroundView]; } + if ([self getBackgroundColor]) { backgroundView.backgroundColor = [self getBackgroundColor]; + } else { + backgroundView.backgroundColor = [UIColor clearColor]; } //Calculate the frame of the navigation bar, based off the orientation.