It is necessary to expand the view depending on the device, if I set a mask in the storyboard then everything works. 
If you write in the code
viewTest.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth; Then, when switching from SE to iPhone 7, the view does not expand, I think the problem is that you need to ask somewhere that you need to expand from SE, but I don’t know how to do it.