Skip to content

Commit a2f4e84

Browse files
author
Ilya Velilyaev
committed
Fix unability to set clear background color
1 parent 8d97ac8 commit a2f4e84

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Classes/NavigationController/UINavigationController+M13ProgressViewBar.m

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,25 +185,29 @@ - (void)updateProgressWithInterfaceOrientation:(UIInterfaceOrientation)interface
185185
if(!progressView)
186186
{
187187
progressView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 0, 2.5)];
188-
progressView.backgroundColor = self.navigationBar.tintColor;
189188
progressView.clipsToBounds = YES;
190189
[self setProgressView:progressView];
191190
}
191+
192192
if ([self getPrimaryColor]) {
193193
progressView.backgroundColor = [self getPrimaryColor];
194+
} else {
195+
progressView.backgroundColor = self.navigationBar.tintColor;
194196
}
195197

196198
//Create background view if it doesn't exist
197199
UIView *backgroundView = [self getBackgroundView];
198200
if (!backgroundView)
199201
{
200202
backgroundView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 0, 2.5)];
201-
backgroundView.backgroundColor = [UIColor clearColor];
202203
backgroundView.clipsToBounds = YES;
203204
[self setBackgroundView:backgroundView];
204205
}
206+
205207
if ([self getBackgroundColor]) {
206208
backgroundView.backgroundColor = [self getBackgroundColor];
209+
} else {
210+
backgroundView.backgroundColor = [UIColor clearColor];
207211
}
208212

209213
//Calculate the frame of the navigation bar, based off the orientation.

0 commit comments

Comments
 (0)