I have a storyboard file where I have added a UITableView and a UIView. The UIView is my attempt to make a custom header, which will be translucent and hence the tableview will be visible through it (I am not sure if this is even possible because I am a novice and this is my first iPhone app).
After handling all the connections with my ViewController class, when I run the code, i gives me this error:
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.
Any ideas about why this is happening will be helpful. Thanks.
You have configured an impossible state in interface builder, as the message says, the layout constraints you have cannot be satisfied all at once. As you’re new, I’d suggest disabling auto layout constraints (go to document tab – left most tab – in interface builder and uncheck auto layout) That will get you rid of this problem
And yes, you can have two views on top of each other, you’ll just have to play with alpha values to configure translucency