iOS/설명
[iOS] translatesAutoresizingMaskIntoConstraints
Sky Titan
2021. 6. 17. 13:59
728x90
translatesAutoresizingMaskIntoConstraints
- true: view를 frame, bounds, rect로 크기, 위치를 조절하고 싶을 때
- false: view를 constraint로 크기, 위치 조절하고 싶을 때
- xib에서 view 생성 시 기본적으로 false
- 코드에서 view 생성 시 기본적으로 true
- 코드에서 view 생성 후 constraint 적용하고 싶으면 이 속성을 false로 바꿔줘야 한다.
728x90