Skip to content

Expected superview but found nil #7

@SirChegal

Description

@SirChegal

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions