UIView resizing but not the SubViews

后端 未结 1 946
抹茶落季
抹茶落季 2021-01-22 18:58

I have an UIView (v1):

 ---------------
|   ---------   |
|  |         |  |
|  |         |  |
|  |         |  |
|  | UIImage |  |     
|  |  View   |  |
|   ----         


        
相关标签:
1条回答
  • 2021-01-22 19:46

    Turn off "Autoresize Subviews" on your UIView v1 attributes in the XIB file.

    By default this is checked.

    This works for your app above. Alternatively, if you wanted some children to auto-resize and some not, then on each child you can disable the auto-size height/width (the red arrows within the "Auto-sizing" box.

    Your UIImageView will then stop resizing.

    0 讨论(0)
提交回复
热议问题