Presumably for performance reasons UIScrollView has some flags that mark whether its delegate implements some of the UIScrollViewDelegate methods:
...
unsigned int delegateScrollViewDidScroll : 1;
unsigned int delegateScrollViewDidZoom : 1;
unsigned int delegateContentSizeForZoomScale : 1;
The respondsToSelector: check occurs when the delegate is set, and only if the delegate is different than the already stored. Since the code keeps setting the same delegate, the UIScrollView won't recheck the realDelegate for implementations. I fixed the issue by nilling out the delegate, as we as reordering the realDelegate setter, to make sure the UIScrollView queries the correct object.
Presumably for performance reasons
UIScrollView
has some flags that mark whether its delegate implements some of the UIScrollViewDelegate methods:The
respondsToSelector:
check occurs when the delegate is set, and only if the delegate is different than the already stored. Since the code keeps setting the same delegate, the UIScrollView won't recheck the realDelegate for implementations. I fixed the issue by nilling out the delegate, as we as reordering the realDelegate setter, to make sure the UIScrollView queries the correct object.