maxep / MXParallaxHeader

Simple parallax header for UIScrollView
MIT License
1.73k stars 251 forks source link

Issue with Masonry #29

Closed fdddf closed 8 years ago

fdddf commented 8 years ago

Hi, I'm using auto layout with Masonry. self.segmentedPager.parallaxHeader.view = self.headerView; self.segmentedPager.parallaxHeader.mode = MXParallaxHeaderModeFill;

The header view has complex subviews , and is auto layout with Masonry. There are some issue can not resolve by myself.

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. ( MASLayoutConstraint:0x124e78970 UIImageView:0x126240dc0.height == 80", MASLayoutConstraint:0x12630adc0 UILabel:0x126281610.height == 30", MASLayoutConstraint:0x124e78870 UIImageView:0x126240dc0.centerY == ShopHeaderView:0x12625f020.centerY", MASLayoutConstraint:0x12630ac50 UILabel:0x126281610.top == UIImageView:0x126240dc0.top + 4, MASLayoutConstraint:0x126309c90 SKTagView:0x124e387b0.top == UILabel:0x126281610.bottom + 8", MASLayoutConstraint:0x12630a3f0 SKTagView:0x124e387b0.bottom == ShopHeaderView:0x12625f020.bottom", NSLayoutConstraint:0x12630ccf0 ShopHeaderView:0x12625f020.height == 0 )

Will attempt to recover by breaking constraint MASLayoutConstraint:0x124e78970 UIImageView:0x126240dc0.height == 80

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger. The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.

Please help me. Thx.

maxep commented 8 years ago

Sorry for the late response. You have a conflicts in the logged constraints, as it says, you should check every one of them. You may try, for example, to decrease the priority of the 'height' constraints.