narco narco - 1 month ago 11
iOS Question

didMoveToSuperview not getting called

I am adding a

UIScrollView
to a UIView.

willMoveToSuperview:
on the scrollview gets called, but for some reason
didMoveToSuperview:
on the scrollview does not get called, even though the scrollview clearly gets added.

I feel like I must be missing something obvious?

Answer

You've probably mistyped the method signature:

- (void)didMoveToSuperview {
  [super didMoveToSuperview];
}