티스토리 뷰
[iOS 오토레이아웃 simple constraints] Two Different-Width Views
from apple auto layout guide
하나의 뷰가 다른 뷰의 2배 너비를 같도록 하는 ui를 만들어 보겠습니다.
전 글(2018/07/27 - [iOS] - [iOS Auto layout simple constraints] Two Equal-Width Views)이랑 거의 비슷합니다. 제약조건 중 yellow view.width = green view.width를 green view.width = 2 * yellow view.width로 바꿔주면 됩니다. 바꾸는 방법은 아래 사진처럼 Multiplier를 2로 설정해 주면 됩니다. multiplier는 숫자(2), 퍼센트(200%), 분수(2/1), 비율(2:1) 4가지 방법으로 설정할 수 있습니다.
'iOS' 카테고리의 다른 글
[iOS 오토레이아웃 Views with Intrinsic Content Size] Simple Label and Text Field (0) | 2018.07.29 |
---|---|
[iOS 오토 레이아웃 simple constraints] Two Views with Complex Width (0) | 2018.07.28 |
[iOS Auto layout simple constraints] Two Equal-Width Views (0) | 2018.07.27 |
[iOS 오토레이아웃 simple constraints] Adaptive single view (0) | 2018.07.27 |
[iOS Autolayout simple constraints] simple single view (0) | 2018.07.26 |