mirror of
https://github.com/samsonjs/samhuri.net-ios.git
synced 2026-04-13 12:35:52 +00:00
fix jumping navbar title with a more reliable orientation check
This commit is contained in:
parent
19d0349bb2
commit
ec38c121a9
1 changed files with 2 additions and 1 deletions
|
|
@ -110,7 +110,8 @@ static const NSUInteger SectionPublished = 1;
|
|||
self.titleViewWidthConstraint.constant = CGRectGetWidth(self.view.bounds);
|
||||
CGFloat height = CGRectGetHeight(self.navigationController.navigationBar.bounds);
|
||||
CGFloat top = 5;
|
||||
if (UIDeviceOrientationIsPortrait([UIDevice currentDevice].orientation))
|
||||
// This is more reliable than checking if it's portrait.
|
||||
if (!UIDeviceOrientationIsLandscape([UIDevice currentDevice].orientation))
|
||||
{
|
||||
// status bar
|
||||
height += 20;
|
||||
|
|
|
|||
Loading…
Reference in a new issue