https://developer.apple.com/documentation/uikit/uiview/1622507-layoutifneeded Apple Developer Documentation developer.apple.com 레이아웃 업데이트를 기다리고 있다면 subview를 즉시 배치합니다. Discussion 뷰의 레이아웃을 즉시 업데이트할 때 이 메서드를 사용하세요. 오토 레이아웃을 사용중이면, 레이아웃 엔진은 제약조건에 맞게 뷰 위치를 업데이트합니다. 루트 뷰의 메세지를 받는 뷰를 사용중이면, 이 메서드는 루트부터 시작하는 뷰의 서브트리를 레이아웃합니다. 기다리고 있는 레이아웃 없데이트가 없으면, 이 메서드는 레이아웃을 바꾸거나 레이아웃 관련된 콜백을 호출하지 않고 종료됩니다. 내용추가 애니메..
![](http://i1.daumcdn.net/thumb/C148x148/?fname=https://blog.kakaocdn.net/dn/bp8jdz/btrKbsc4GQJ/kht28o9rYHY9c7RXg0zNO0/img.png)
View and Window Architecture https://developer.apple.com/library/archive/documentation/WindowsViews/Conceptual/ViewPG_iPhoneOS/WindowsandViews/WindowsandViews.html#//apple_ref/doc/uid/TP40009503-CH2-SW9 View and Window Architecture View and Window Architecture Views and windows present your application’s user interface and handle the interactions with that interface. UIKit and other system frame..
![](http://i1.daumcdn.net/thumb/C148x148/?fname=https://blog.kakaocdn.net/dn/bF2qtM/btqVcsnjdCI/uITWIkC3xMK0tNof25wiQ1/img.png)
예시를 통해 빠르게 알아보겠습니다. let testView = UIView() view.addSubview(testView) testView.translatesAutoresizingMaskIntoConstraints = false NSLayoutConstraint.activate([ testView.widthAnchor.constraint(equalToConstant: 300), testView.heightAnchor.constraint(equalToConstant: 300), testView.centerXAnchor.constraint(equalTo: view.centerXAnchor), testView.centerYAnchor.constraint(equalTo: view.centerYAnchor) ]..