Skip to content

Commit 3431005

Browse files
committed
Merge pull request #71 from harlanhaskins/master
Fixed progress width calculation
2 parents 5665de3 + d3920a0 commit 3431005

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Classes/NavigationController/UINavigationController+M13ProgressViewBar.m

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,13 @@ - (void)updateProgressWithInterfaceOrientation:(UIInterfaceOrientation)interface
163163
}
164164

165165
//Calculate the frame of the navigation bar, based off the orientation.
166-
CGSize screenSize = [UIScreen mainScreen].bounds.size;
166+
UIView *topView = self.topViewController.view;
167+
CGSize screenSize;
168+
if (topView) {
169+
screenSize = topView.bounds.size;
170+
} else {
171+
screenSize = [UIScreen mainScreen].bounds.size;
172+
}
167173
CGFloat width = 0.0;
168174
CGFloat height = 0.0;
169175
//Calculate the width of the screen

0 commit comments

Comments
 (0)