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
Status bar disappears in iOS 11 #1122
Comments
iOS11 introduce lots of new features which affects library very badly. |
Is a fix on the way? |
I am facing the same issue. Is there any workaround for this? |
Currently no workaround. Can someone upload sample code to reproduce this issue? |
Hi guys, my workaround was : In IQKeyboardManager.swift, inside the keyboardDidHide method, add the following :
in the end, your keyboardDidHide look like this :
I know it is maybe not the best since I harcoded the background to be white but that made the trick for me . One solution for you could be to store the background color of the status bar in a variable before the keyboard appears and reattributting this color in the KeyboardDidHide . |
i have same issue... |
Here is the solution: |
It's fixed with new solution, changes are in |
This still happens for some reason even when having the deprecated "canAdjustAdditionalSafeAreaInsets" boolean set to true. (Using v6.0.0 from cocoapods) Disabling the manager stops it from happening so it can't possibly be my implementation.. |
@nCr78 can you please share a demo project using v6.0.0? |
@hackiftekhar Yes give me some time to isolate my implementation and I'll upload a gist of a view controller |
It would be better if you provide the demo project instead of code of a single view controller. It's better for me otherwise I'll have to do extra work to integrate your code to another demo project and all that. |
Alright, will do it as a project! No problem :) |
Upon trying to isolate and reproduce the issue onto a new project, I found out that it's caused by a combination of your project and another open source project. This complicates things because I don't know exactly which parts of each project are conflicting except from their custom tab bar controller. On top of that, I could only reproduce it on a physical iPhone X (iOS 11+). I've tried the simulator and the status bar stays as it is. I ran it on a physical iPhone 7 (iOS 11+) and the issue isn't there either. Here's the project in case you want to check it out. I might have to change my implementation as I don't see how this is fixable - my guess is safe areas and UIView extension conflicts. |
I started reviewing the demo project. However I don't have physical iPhoneX or iPhone8+ size device so I'm unable to reproduce this issue with this demo project and as you said it isn't reproducible with simulators. :( |
I have the same problem. Tried upgrading to 6.0.4 but it still happens. Using iPhone6. Solutions for setting status bar color to white is not a solution, it just sets the status bar color to white ;-) Really need a fix for this. |
with the arrow fix, please make sure your textFields are in correct order in view hierarchy since it mostly happens with wrong view hierarchy. |
i try to fix the bug.
|
I can also see this problem on the iPhone 6, 7 Plus and iPhone Xs Max. It does not happen the first time after closing the keyboard. It works in this pattern:
So the behavior has a system. My keyboard settings are set like this: |
I found the cause of the problem in my code. In the function viewDidLayoutSubviews I read and use the view.safeAreaInsets.top value. Sometimes if the keyboard show up the viewDidLayoutSubviews function is called. The value of view.safeAreaInsets.top is sometimes 0 instead of 20 or 44. That's how I solved the problem:
|
try "IQKeyboardManager.shared().layoutIfNeededOnUpdate = true" |
Thanks works for me too... |
Hello,
The following issue only happens on iOS 11 and on both simulator and real devices.
When the keyboard comes up everything is fine, but when I tap done the keyboard lowers and I have no status bar left and all components on that view are moved up. The next time the keyboard rises and lowers the status bar is back. The missing status bar happens ever other raise and lower of the keyboard. Below are some screenshots that help relay the issue, the black marks are my vertical constraints that connect the bottom and top of the view. The TextView at the bottom doesn't have a height constraint so on smaller devices it shrinks
The text was updated successfully, but these errors were encountered: