-
Notifications
You must be signed in to change notification settings - Fork 1.1k
iOS 11 breaks slacktextviewcontroller #604
Comments
Confirmed 😮 |
@hipwelljo however it works on apps built pre iOS 11 which is wierd |
It seems that this bug is caused by a new subview which is added only for iOS 11 On iOS 10, the subviews array for textInputbar looks like this:
On iOS 11, the subviews array for textInputbar has a new element, which is right at the top of view hierarchy.
Notice the _UIToolbarContentView subview, right at the top (aka last object from subviews array)! A quick temporary workaround is to do something like this in your controller: Or: Hope this is good enough until we have a proper fix |
@claudiumatei - thanks for the workaround. If I add this code, I can now type in the input box (in the simulator using a keyboard) but the keyboard does not appear on on a device when you click on the text input box. Do you have the same problem or know of a workaround to make the keyboard appear? |
The workaround committed by paulcarpenter is working nicely for me. |
It seems that inserting or deleting rows causes the entire tableView to stop responding as something is wrong with layout of the views. |
…ne layout. This fixes #604 rendering SLKTVC useless in iOS 11 since UIToolBar's view hierarchy has drastically changed since, conflicting with the internal outlets of SLKTextInputbar
Any review/testing of the above fix would be helpful ☝️ |
@dzenbot Haven't tried it, but wanted to note a UIView subclass would be a solid background instead of the translucent blurred toolbar. (Though it seemed the toolbar wasn't actually translucent anyways, I didn't see elements through it in my app). Just wanted to be sure that's what is desired now. |
So people may want to have blurred toolbar effects, indeed. I though of that, and this should be as simple as making the view translucent and add a This change will certainly not be backwards compatible for those use cases, but there is a simple workaround. |
I tested #624 and it works for our application - thanks |
* Fixed Xcode warnings + deprecating -shouldProcessTextForAutoCompletion: * Making SLKTextInputbar a UIView subclass instead, with its own hairline layout. This fixes #604 rendering SLKTVC useless in iOS 11 since UIToolBar's view hierarchy has drastically changed since, conflicting with the internal outlets of SLKTextInputbar * Changelog
I programmatically called becomeFirstResponder() on the textfield. Keyboard appeared, but the textfield was still on the bottom 😾 |
I am using cocoa pods. What do I need to do to get this update? |
* Fixed Xcode warnings + deprecating -shouldProcessTextForAutoCompletion: * Making SLKTextInputbar a UIView subclass instead, with its own hairline layout. This fixes slackhq#604 rendering SLKTVC useless in iOS 11 since UIToolBar's view hierarchy has drastically changed since, conflicting with the internal outlets of SLKTextInputbar * Changelog
To solve the problem for iOS11 (compatible with lower versions) you only need In this case _UIToolbarContentView lowers to the first subview of UIToolBar, and you can For example in ObjC,
|
Interesting. Still, it seemed better to simply stop using UIToolbar altogether. We were only using it for getting the built-in blurring effect and the hairline anyway. With the current fix, only the blurring effect would need to be added adhoc by developers, if needed. |
This reverts commit 2b4cee5.
Hi Guys, I am facing different issue. Contents drawn on the CGContext of the UIImageView got disappeared. I have attached the video which demonstrates the issue i was facing in my side. I am getting this issue only in iOS 11 iPad. I could not reproduce the issue in iPod/iPhone with iOS 11. Can you please let me know if you have any idea on this? Video: https://www.dropbox.com/s/7nhnaqdhh8ha7u1/Untitled.zip?dl=0 |
Description
Cannot press the textview due to there being an invisible view over it.
Reproducible in:
SlackTextViewController version:
iOS version(s): 11
Device(s): All iOS 11 compatible devices.
Steps to reproduce:
Expected result:
Expected me to be able to send messages etc
Actual result:
Couldn't open textview
Attachments:
The text was updated successfully, but these errors were encountered: