Search code examples
iosxcodeautolayoutxibnslayoutconstraint

How to add constraint to custom table view cell xib file?


To implement expanding custom table view cell, I used custom xib file with UITableViewCell.

But I cannot find constraint panel in that xib file.

In order to fit to variable device size, I have to set trailing constrain. Is it impossible to set constraint in custom xib file?


Solution

  • Select your .xib file -> Show File Inspector -> Use Auto Layout

    Constraints will start appearing at bottom.
    enter image description here