How to make a custom view resize with the window with Cocoa Auto Layout?

后端 未结 4 1233
野趣味
野趣味 2020-12-12 08:24

I have a single window with a single custom view in it, and I want the custom view to resize with the window so that it entirely fills it at any time. If I write:

         


        
4条回答
  •  北荒
    北荒 (楼主)
    2020-12-12 09:01

    I have discovered that -drawRect: willnot get called in the event the frame rectangle is 0,0,0,0. Undesirable constraints seem to cause the frame to become 0,0,0,0.

提交回复
热议问题