I created the UIBiew xib in Interface Builder and tried everything I could to indicate that the UIView should center itself, fix itself in the center, navigate in central coordinates, etc. etc.
But whenever I add it as a subview in the code, I also need to programmatically set its frame with CGRectMake(), otherwise it will always be added to the upper left corner of its parent. The math to redraw it is pointless and ugly, so I guess I just won’t return a bit in IB inspector correctly.
Can anyone confirm this, and if so, what do I need to do in IB to do this?
source
share