Xcode의 Interface Builder에서 다음과 같은 사용자 인터페이스를 만들려고합니다.
간단한 목표, 제 생각에는… 이전에 사용자 정의 코드를 사용하여이 모든 것을 프로그래밍 방식으로 수행했지만 "올바른 방법"으로 수행하고 Interface Builder에서 올바르게 설계하고 모든 레이아웃을 처리하도록하겠습니다.
Interface Builder에서 다음과 같은 소형 폼 팩터 iPhone 용 화면을 디자인했다고 가정 해 보겠습니다.
이제 iPhone 4s 장치에 만족하고 더 새롭고 더 큰 iPhone 폼 팩터의 너비에 비례하여 모든 것을 확장하고 싶습니다.
이전의 "스프링 및 스트럿"방법을 사용한다면 거의 모든 것이 높이 방향으로 늘어난다는 점을 제외하면 더 큰 폼 팩터에서 원하는 것을 얻을 수 있습니다 (단순히 원래 디자인의 너비와 높이의 종횡비를 기반으로하지 않음). ) 특히 "로고 이미지"가 너무 크게 늘어난 것을 알 수 있습니다. 그리고 글꼴은 레이블이나 버튼에서도 크기가 조정되지 않습니다.
I've also tried using "constraints", particularly just tackling the issue of image scaling proportionally, basing it on the aspect ratio of the container, and am not having any luck whatsoever.
Here I reset the springs and struts to their defaults, and add constraint to the original design's logo image:
Looking at the larger form factor, nothing has in fact changed:
(And yes, despite the fact there's layout errors reported, "fixing" them in any way has no net effect on the scaling / lack of scaling in the image.)
So just to restate-- how do I do the following with Xcode / Interface Builder constraints?
미리 감사드립니다.
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다