-
Notifications
You must be signed in to change notification settings - Fork 67
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
Calling reloadInputAccessoryView after view is collapsed causes a crash #12
Comments
Multiple people have reported this already and it obviously has to do with the assert but I did put that assert there for a reason. I haven't been able to reproduce the crash myself, do you have a sample project I can take a look at by any chance? |
I don't have sample code but its pretty easy to replicate
|
That function does no longer exist. Does it help to use the latest code from the master branch? |
Ah, I'm using a cocoapod I'll update my cocoa pod to point to master and see if its still a problem. |
Thanks, I try :-) What exactly do you want to achieve? I assume you pressed the return key several times and collapsed the keyboard afterwards, which causes the textview to keep its height to accommodate for the linebreaks. This behavior can be found in apps such as Whatsapp as well, except that Whatsapp does not allow a linebreak character as the first character in the textview. If that is what you want in your app, you could implement inputViewKeyboard.textView's delegate. |
👍 This is what I did 1: Type text in the text field
2: "Send" the text to the server In a way I'm trying to get it to behave like the messages app when you're sending a paragraph to someone. After its sent, the text view shrinks to one line |
Ah, that makes sense. Will think about a solution. Feel free to file a pull request when you've found a (neat) solution yourself. |
Hey @reygonzales did you ever find a workaround for this? |
The app crashes if the input view is reloaded (with reloadInputAccessoryView) when the view is collapsed.
I need to refresh the view when it is collapsed -- the user can still hit "Send"
Stack trace
2014-05-22 14:09:19.250 NearKat[21012:60b] *** Assertion failure in -RDRStickyKeyboardView _updateInputViewFrameWithKeyboardFrame:forceReload:, /Users/reynaldo/Documents/Workspace/nearkat-ios/Pods/RDRStickyKeyboardView/RDRStickyKeyboardView/RDRStickyKeyboardView.m:754
2014-05-22 14:09:19.255 NearKat[21012:60b] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: ''
*** First throw call stack:
(
0 CoreFoundation 0x039bc1e4 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x032ba8e5 objc_exception_throw + 44
2 CoreFoundation 0x039bc048 +[NSException raise:format:arguments:] + 136
3 Foundation 0x017f5b20 -[NSAssertionHandler handleFailureInFunction:file:lineNumber:description:] + 101
4 NearKat 0x0023beec -[RDRStickyKeyboardView _updateInputViewFrameWithKeyboardFrame:forceReload:] + 572
5 NearKat 0x00238a60 -[RDRStickyKeyboardView reloadInputAccessoryView] + 96
The text was updated successfully, but these errors were encountered: