-
Notifications
You must be signed in to change notification settings - Fork 214
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
Fix iOS9 keyboard target. #98
base: master
Are you sure you want to change the base?
Conversation
Keyboard target moved, take
@AndresCanella thanks! Do you happen to know if this works with 3rd party keyboards? Will test later in any case. |
@danielamitay Tested and working with Swift Key and regular keyboards on iPhone 6 iOS 9. Using these methods
And these properties
|
@danielamitay Thanks for maintaining this DAKeyboardControl. Good stuff. |
for(UIWindow* window in [[UIApplication sharedApplication] windows]) | ||
if([window isKindOfClass:NSClassFromString(@"UIRemoteKeyboardWindow")]) | ||
for(UIView* subView in window.subviews) | ||
if([subView isKindOfClass:NSClassFromString(@"UIInputSetHostView")]) |
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.
--The class name here should be "UIInputSetContainerView"
Nvm this way seems works as well
Yes, it's working. Thanks @AndresCanella . I like DAKeyboardController, it's better than Apple iOS7 keyboardDismissMode, specially when you have a UIToolBar. |
Glad to contribute. |
yup , it's work as well , but i have problem in Landscape mode , if i want to dismiss my keyboard , every thing in my view going to hidden & textField come from top of my View :| !!! |
Good find @mfarhand, I don't use landscape. Was this working properly before? All I did was fetch the target view from where iOS moved it to. It might change on landscape or is now treated differently in some way... If I have some free time I'll take a look. |
@AndresCanella yup , it was working properly before , but with this code all of my ( bubble ) & ... going to hidden & in touch end event my text field coming from status bar :D !!! -(UIView_) findInputSetHostView { you can see the screenshot |
@AndresCanella any news ? |
@mfarhand I'd love to contribute more but I have my hands full. Have you managed to fix it? |
@AndresCanella i have handled it only in portrait mode with this way : |
@mfarhand You can wait till someone fixes this(who knows when), or you can try to fix it yourself. You need to figure out what is going on with the views that are being used. For starters you could add You can also probably find other similar frameworks that have already solved this and check what they did to fix it. Generally you can also find comments of people that have an idea of what's going on. My solution is based on a comment someone did on the original bug report thread. #95 (comment) P.S. Use markdown so |
Keyboard target moved, I've targeted the new location. But have not gone in deep to check how all your code works. I've not tested with older versions of iOS, but did add a check to use this fix only for iOS 9+. I apologize if my code is not super clean, I had very little time for this. Cheers.