Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expected superview but found nil #7

Open
SirChegal opened this issue Apr 30, 2020 · 2 comments
Open

Expected superview but found nil #7

SirChegal opened this issue Apr 30, 2020 · 2 comments

Comments

@SirChegal
Copy link

private func updateAlignment(_ start : ConstraintMakerExtendable, _ end : ConstraintMakerExtendable, _ center : ConstraintMakerExtendable, _ child : KittenItem){
switch child.alignment{
case .start:
start.equalToSuperview().offset(child.sideStartPadding)
end.lessThanOrEqualToSuperview().offset(-child.sideEndPadding)
case .end:
start.greaterThanOrEqualToSuperview().offset(child.sideStartPadding)
end.equalToSuperview().offset(-child.sideEndPadding)
case .center:
center.equalToSuperview()
start.greaterThanOrEqualToSuperview().offset(child.sideStartPadding)
end.lessThanOrEqualToSuperview().offset(-child.sideEndPadding)
case .parent:
start.equalToSuperview().offset(child.sideStartPadding) <-- at this
end.equalToSuperview().offset(-child.sideEndPadding)
}
}

"Expected superview but found nil when attempting make constraint equalToSuperview."
Only in release, debug version all ok. iOS 13.4.1

@SpringCWong
Copy link

Do you have any sample code / source that i can re-produce this issue?

@SirChegal
Copy link
Author

SirChegal commented May 29, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants