I added a search for the first encountered UIView at the root level of the nib, and consider that the containerView (if it exists).
It is not uncommon to have other objects in the first position at root level. One example (which was my case) is with gesture recognizers created in Interface Builder. They are placed at the root, before my container UIView.
I added a search for the first encountered UIView at the root level of the nib, and consider that the containerView (if it exists).
It is not uncommon to have other objects in the first position at root level. One example (which was my case) is with gesture recognizers created in Interface Builder. They are placed at the root, before my container UIView.