관리 메뉴

김종권의 iOS 앱 개발 알아가기

[iOS - swift] remove at build time 옵션 LayoutConstraints 에러, Unable to simultaneously satisfy constraints 본문

iOS 기본 (swift)

[iOS - swift] remove at build time 옵션 LayoutConstraints 에러, Unable to simultaneously satisfy constraints

jake-kim 2021. 4. 8. 02:31

실행할때 경고 메세지가 나오는 경우

  • storyboard에서 constraint 설정 후 코드에서도 동일한 부분에 constraint를 설정한 경우 발생
  • 이때 코드에서 설정한 부분이 우선순위가 높아서 적용
  • 위 경고 메세지를 삭제하려면, storyboard에서 "remove at build time"옵션을 체크하면 해결
    - 주로 storyboard에서는 가시적으로 보이도록 constraint설정 후 실제는 코드에서 constraint가 적용되는 경우 사용

Remove at build time 체크

 

Comments