I have a tableView ("tableView") with a UIScrollView (when the user scrolls the tableView changing its position), I want that when the user "over-scrolls" the tableView up, there will be a white UIView ("whiteViewUnderAroundersTableView") that goes from the bottom of the tableView, an example of the scroll: scroll example
My code:
//Creating "whiteViewFrame", a frame for "whiteViewUnderTableView"(a white view in the scrollView that goes behind the "tableView" and shows a white view when Over-Scrolling up) with the Y position of the end of the "tableView"
CGRect whiteViewFrame=CGRectMake(self.whiteViewUnderTableView.frame.origin.x, CGRectGetMaxY(self.tableView.frame), self.whiteViewUnderTableView.frame.size.width, self.whiteViewUnderTableView.frame.size.height);
//Changing "whiteViewUnderTableView"'s frame to "whiteViewFrame"
self.whiteViewUnderTableView.frame=whiteViewFrame;
//Changing "whiteViewUnderAroundersTableViewTopConstraint" (Y coordinate constraint of "whiteViewUnderAroundersTableView")'s constant to "AroundersTableView"'s Y coordinate
self.whiteViewUnderAroundersTableViewTopConstraint.constant=self.whiteViewUnderAroundersTableView.frame.origin.y;
The error in the log:
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...