So, I created the UIView constructor in the interface. I use AutoLayout , and I have one view of this view attached to all four sides.
Thatโs what I donโt understand. When I load this NIB file using loadNibNamed . Then I get a link to the view. I set the frame for this view. And yet, when I access the subview (using [ containerView viewWithTag:1 ]), it was not automatically changed. What gives? If you change the frame for the parent view, why not the subtask frame?
That doesn't make any sense.
Why can't you just download the UIView , set its frame and configure all the subzones accordingly (ESPECIALLY, since I use AutoLayout !)?
EDIT. To be clear, all I want to do is define a UIView hierarchy in IB with the appropriate AutoLayout restrictions, and then be able to load and display this view on the screen, sometimes of different sizes? Why is it so hard?
ios
Neil
source share