The thing is this ....
I have been used in a project masonry do AutoLayout, there is a gesturerreconizer bug, looking for a long time, found very strange a phenomenon:
One of my view is like this.
|--------------------------------------|
| Uiviewcontroller.view |
| |----------| |--------------------|
| | uiview1-| | Uiscrollview |
| |----------| | |
| | |-------------| |
| | | UIView2 | |
| | |-------------| |
| |--------------------|
|------------------------------------------
Uiscrollview's Contentview was omitted.
Supposedly, I should add view2 to Uiscrollview, but I accidentally wrote it wrong and added it to the outermost view:
[Self.view addSubview:self.view2];
And then added a number of constraint
[Self.view2 makeconstraints:^ (Masconstraintmaker *make) { make.top.equalTo (self.orderSectionView.bottom). offset (+); Make.height.equalTo (@200); Make.left.and.right.equalTo (_rightdownscrollcontentview); }];
The key is, at first, everything went well, ran successfully!!!! The location is also right, as I add it into the ScrollView, but also can slide!!
But I use the original addconstraint:xxx option will have a lot of unsatisfied constraint msg produced ...
But this view2 of tap event handling has been problematic.
Two understanding:
1. Although the view hierarchy is not correct, but the constaint is satisfied, when the scroll, its dependent view position has changed, so it follows the slide
2. System Bug
A peculiar problem of masonry uiscrollview AutoLayout