Same problem. As already mentioned, @John Nimis, playing with masks, somehow seems to solve the problem. For example, when we had both upper and lower masks (UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleBottomMargin), we got success by removing the top one.
EDIT I do not know if this is the final solution, but I noticed that there was a problem everywhere. I had a fixed origin (x or y) on the frame. For example:
view.frame = (view1.frame.origin.x, 150, width, height);
Changing a fixed value in a relative value (for example, in relation to another view1) solved the problem with masks:
view.frame = (view1.frame.origin.x, view1.frame.origin.y + view1.frame.size.height + 20, width, height);
Donnit
source share