Skip to content

Constraints error when setting height to 0 #40

Description

@MartinBergerDX

My table view cell is pretty complex, with collapsible elements. URLEmbeddedView can have height 0, if there is no url for that index. But i get constraints error because of internal constraints in URLEmbeddedView:

Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x608000492570 V:[UILabel:0x7fd7c7f91d90]-(2)-[UILabel:0x7fd7c7f92010] (active)>

(lldb) po ((UILabel*)0x7fd7c7f92010).superview
<URLEmbeddedView.URLEmbeddedView: 0x7fd7c7f91340; frame = (0 0; 355 0); clipsToBounds = YES; autoresize = RM+BM; layer = <CALayer: 0x608000a21020>>

(lldb) po ((UILabel*)0x7fd7c7f91d90).superview
<URLEmbeddedView.URLEmbeddedView: 0x7fd7c7f91340; frame = (0 0; 355 0); clipsToBounds = YES; autoresize = RM+BM; layer = <CALayer: 0x608000a21020>>

Can you adjust priorities of constraints to accomodate 0 height? Or maybe Relation?

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