Skip to content

Commit

Permalink
Fix unability to set clear background color
Browse files Browse the repository at this point in the history
  • Loading branch information
Ilya Velilyaev committed Nov 3, 2016
1 parent 8d97ac8 commit a2f4e84
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -185,25 +185,29 @@ - (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
UIView *backgroundView = [self getBackgroundView];
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.
Expand Down

0 comments on commit a2f4e84

Please sign in to comment.