Pulley icon indicating copy to clipboard operation
Pulley copied to clipboard

LayoutConstraints issue on iOS 11.4

Open FedeGens opened this issue 5 years ago • 1 comments

Hi,

I want to start saying that I love your work. But I found a problem on iOS 11.4.

Where on iOS 12 Pulley works great, on iOS 11.4 it has a constraints issue. Following the console log from iOS 11.4:

[LayoutConstraints] 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:0x60000048f1e0 h=--& v=--& UIView:0x7fcdb3501af0.midY == 1018 (active)>", "<NSAutoresizingMaskLayoutConstraint:0x60000048f190 h=--& v=--& UIView:0x7fcdb3501af0.height == 768 (active)>", "<NSAutoresizingMaskLayoutConstraint:0x60000048f050 h=--& v=--& Pulley.PulleyPassthroughScrollView:0x7fcdb401f800.midY == 394 (active)>", "<NSAutoresizingMaskLayoutConstraint:0x60000009dc90 h=--& v=--& Pulley.PulleyPassthroughScrollView:0x7fcdb401f800.height == 748 (active)>", "<NSLayoutConstraint:0x608000480230 V:|-(0)-[UILayoutContainerView:0x7fcdb35318b0] (active, names: '|':UIView:0x7fcdb3501af0 )>" )

It causes the drawerViewController to have a wrong layout configuration.

It could be related to func constrainToParent(insets: UIEdgeInsets)

Thanks, F.

FedeGens avatar May 05 '19 23:05 FedeGens

You have autoresizing mask based constraints on one or more views in your view controller. These have a priority of 1000, which conflicts with the initial CGRectZero frame size.

I recommend not using resizing masks and (if necessary) lower the priority of the constraint causing issues (999 is fine).

amyleecodes avatar May 06 '19 00:05 amyleecodes