Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -209,31 +209,10 @@ - (void)updateProgressWithInterfaceOrientation:(UIInterfaceOrientation)interface
} else {
backgroundView.backgroundColor = [UIColor clearColor];
}

//Calculate the frame of the navigation bar, based off the orientation.
UIView *topView = self.topViewController.view;
CGSize screenSize;
if (topView) {
screenSize = topView.bounds.size;
} else {
screenSize = [UIScreen mainScreen].bounds.size;
}
CGFloat width = 0.0;
CGFloat height = 0.0;
//Calculate the width of the screen
if (UIInterfaceOrientationIsLandscape(interfaceOrientation)) {
//Use the maximum value
width = MAX(screenSize.width, screenSize.height);
if ([UIDevice currentDevice].userInterfaceIdiom == UIUserInterfaceIdiomPhone) {
height = 32.0; //Hate hardcoding values, but autolayout doesn't work, and cant retreive the new height until after the animation completes.
} else {
height = 44.0; //Hate hardcoding values, but autolayout doesn't work, and cant retreive the new height until after the animation completes.
}
} else {
//Use the minimum value
width = MIN(screenSize.width, screenSize.height);
height = 44.0; //Hate hardcoding values, but autolayout doesn't work, and cant retreive the new height until after the animation completes.
}

//Change the progress and background view frames to match the navigationBar
CGFloat width = self.navigationBar.frame.size.width;
CGFloat height = self.navigationBar.frame.size.height;

//Check if the progress view is in its superview and if we are showing the bar.
if (progressView.superview == nil && [self isShowingProgressBar]) {
Expand Down