Skip to content
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

NSRangeException for multiple GrowingTextView #28

Open
xiaoleichen opened this issue Mar 27, 2018 · 1 comment
Open

NSRangeException for multiple GrowingTextView #28

xiaoleichen opened this issue Mar 27, 2018 · 1 comment

Comments

@xiaoleichen
Copy link

I have a table view and each cell has a UITextView. After I changed the UITextView to GrowingTextView, I got this exception when I have several cells in the table:

Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArrayM objectAtIndex:]: index 6 beyond bounds [0 .. 5]'
*** First throw call stack:
(0x181be9d04 0x180e38528 0x181b82bd4 0x181ab29a0 0x18b33b774 0x18b33c3b8 0x18b0f1508 0x18b01e304 0x185bd7ec8 0x185bdbfa8 0x185b4aa98 0x185b70eb4 0x185b71cf4 0x181b91848 0x181b8f200 0x181b8f7bc 0x181aaffb8 0x183947f84 0x18b0842f4 0x1010f2678 0x1815d256c)
libc++abi.dylib: terminating with uncaught exception of type NSException

The first throw call stack is not very helpful because it doesn't specify which line of code is causing the issue. But I don't have this exception under the same circumstances if I just use the native UITextView.

@KennethTsang
Copy link
Owner

I think it is really not a good idea to add GrowingTextView into a UITableViewCell, it is quite difficult to deal with the state when the cell is reused. If your list doesn't contain too many items, I suggest simply use a UIStackView instead of UITableView.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants