I have a text view,a 'save' button and a table view in my app.If I want my text in text view to be added to table view I press 'save' button. This is how it works.
Now here come two problems:
- If text view contains only '\n' I want my button to be disabled
- My cells in table view are of dynamic height, which means that I calculate number of lines for the label in a table view's cell
So, the first part of the question is: Do I need to parse for all characters in text view and figure out whether they match '\n' and if there are only '\n' symbols in the text view?Are there any ways to do it easier with text view?
The second part: In which way can I calculate row's height when I told that the text view has some '\n' symbols?