I have a class MyTextView
which inherits from UITextView
. I also have a MyViewController
which is a subclass of UIViewController
. MyViewController
implements the UITextViewDelegate
protocol and is set as the delegate of MyTextView
.
MyViewController
implements some of the delegate methods from the UITextViewDelegate
(like - (void)textViewDidChange:(UITextView *)textView
) and they all work fine. However, when I try to implement - (void)scrollViewDidScroll:(UIScrollView *)scrollView
or some or the other scroll delegate methods they do not get called. It is my understanding that this should work since UITextView
inherits from UIScrollView
and UITextViewDelegate
conforms to UIScrollViewDelegate
which declares the scroll methods in question.
The strange thing is that if I go into IB and change the class of the text view from MyTextView
to UITextView
all the delegate methods get called, including the scrolling onces.