2012-12-26 3 views
0

나는 스토리 보드 파일과 UIView를 추가했다. UIView는 반투명 할 사용자 정의 헤더를 만들기위한 시도이며 따라서 테이블 뷰를 통해 볼 수 있습니다 (초보자이기 때문에 가능한지 확실하지 않고 첫 번째 iPhone 앱입니다). 이 도움이 될 것입니다 일어나고있는 이유에 대해UIView에 두 개의 뷰 추가

Unable to simultaneously satisfy constraints. 
Probably at least one of the constraints in the following list is one you don't want.   
Try this: (1) look at each constraint and try to figure out which you don't expect; (2) find the code that added the unwanted constraint or constraints and fix it. (Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints) 
(
"<NSAutoresizingMaskLayoutConstraint:0x8988060 h=--& v=--& V:[UIView:0x7574100(460)]>", 
"<NSLayoutConstraint:0x7574780 V:|-(0)-[UIView:0x75742b0] (Names: '|':UIView:0x7574100  )>", 
"<NSLayoutConstraint:0x7574700 V:[UIView:0x75742b0]-(494)-| (Names: '|':UIView:0x7574100)>" 
) 

Will attempt to recover by breaking constraint 
<NSLayoutConstraint:0x7574700 V:[UIView:0x75742b0]-(494)-| (Names: '|':UIView:0x7574100 )> 

Break on objc_exception_throw to catch this in the debugger. 
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful. 

모든 아이디어 : 나는이 코드를 실행하면

내의 ViewController 클래스로 모든 연결을 처리 한 후, 나는 나에게 오류를 제공합니다. 감사.

답변

2

인터페이스 빌더에서 불가능한 상태를 구성했습니다. 메시지에 표시된대로 레이아웃 제약 조건을 모두 만족시킬 수는 없습니다. 새로운 기능인 경우 자동 레이아웃 제약 조건을 해제하는 것이 좋습니다 (문서 탭으로 이동 - 대부분의 탭 - 인터페이스 빌더에서 선택 취소하고 자동 레이아웃 선택 취소). 그러면이 문제가 해결됩니다.

그렇습니다. 서로 위에 두 개의보기가 있으면 투명도를 구성하기 위해 알파 값으로 재생해야합니다.

+0

그 트릭을했습니다. 고마워. :) –

+0

도움이 되서 기쁘다. 대답으로 표시해야합니다. –

관련 문제