Good afternoon!
Excuse me for my English.
I've got a problem trying to assign textView's delegate to another class.
- I have a CommentsViewController and a ViewController in a storyBoard connected to it.
- I've got an UITextView element on ViewController(in storyBoard) and an outlet to CommentsViewController (called newCommentTextView).
- I've created a class CommentTextViewDelegate: NSObject, UITextViewDelegate.
In CommentsViewController's viewDidLoad I've done this
newCommentTextView.delegate = CommentTextViewDelegate()
I've added and textViewDidChange, and textViewDidEndEditing, and _:shouldChangeTextInRange:... . But none of these functions are called, when I change textView's text!
What's wrong with me? Thank you.