Hi,
I have a textview and I would that while the user enters text, the first line of it becomes the navigation bar title.
I have this code:
Code:
- (void)textViewDidChange:(UITextView *)textView {
self.navigationItem.title = textView.text;
}
In this way I see the title change dynamically with the text.
Only one more thing I'd like to have, that is stopping the update if the user enters a newline.
For example, if the user enters in the textview
"It's a title\nAnd then there are other words"
I'd like to see in the title only:
"It's a title"
while now there is something like this:
"It's a title And then there are..."
Any ideas?
Thanks,
Fran