-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed a problem when using -showTabBar:
in iPad started in landscape mode
#20
Conversation
This modification has a problem, please ignore it, I forgot that the |
Sorry, mis clicked the close this pull request button. |
The new modification contains the logic based on the tabViewController only. |
@@ -163,12 +175,12 @@ - (void)setTabBarOriginY:(CGFloat)y animated:(BOOL)animated | |||
CGFloat toolBarHeight = frame.size.height; | |||
CGSize viewSize = self.tabBarController.view.frame.size; | |||
CGFloat viewHeight = UIInterfaceOrientationIsPortrait(self.interfaceOrientation) ? viewSize.height : viewSize.width; | |||
|
|||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove white spaces.
@@ -138,7 +138,19 @@ - (void)setToolbarOriginY:(CGFloat)y animated:(BOOL)animated | |||
|
|||
- (void)showTabBar:(BOOL)animated | |||
{ | |||
CGFloat viewHeight = self.tabBarController.view.frame.size.height; | |||
/* NOTE by Tonny |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this comment is redundant because it's caused by my implementation miss and this tabBar behaviour is known.
Thanks to your patch. Basically, it looks good. I added few comments. |
Sorry, I just removed those dev notes and white spaces. |
CGFloat topLimit = viewHeight - toolBarHeight; | ||
CGFloat bottomLimit = viewHeight; | ||
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove unnecessary white spaces (but leave new line 😃 )
👍 Good reviewer! :p Done. |
LGTM 👍 |
Fixed a problem when using `-showTabBar:` in iPad started in landscape mode
Highly possibly it's a bug in UIKit that when you access the view from the TabBarController, you got a fixed view size discarded the orientation info.