Every time I create my UIScrollView
subclass I add a UIImageView
to it. I get the image for the UIImageView
from the scroll view's init
method where I pass a UIImage
.
But where do I add this subview? Normally I would do it in awakeFromNib
but this is created programmatically. And it's bad practice to mess with the view hierarchy in the init
methods.
Where should I do it?