2

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?

5
  • yes its possible to add constraints, just like you in xib file. Commented Jun 15, 2016 at 19:42
  • if you refer to the 'main' view:stackoverflow.com/questions/24527478/… and stackoverflow.com/questions/29711012/… Commented Jun 15, 2016 at 19:45
  • @user3802077 Thank you for your response. But I cannot see constraint panel in the xib interface. Do I have to place UITableViewController? Now I placed UITableViewCell Commented Jun 15, 2016 at 19:49
  • @Aamir Is it possible in case of placing UITableViewCell only(there isn't any controller)? I cannot find constraint control buttons. Commented Jun 15, 2016 at 19:55
  • posted answer for you. Commented Jun 15, 2016 at 23:15

1 Answer 1

8

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

Constraints will start appearing at bottom.
enter image description here

Sign up to request clarification or add additional context in comments.

4 Comments

Thank you for your help. You saved my time. Really helpful.
sorry I cannot up vote now. You know my reputation is under 15. When I can do it, I'll up vote it.
You saved my day, didn't expect that can be the solution.
"Use Auto Layout" doesn't exist in Xcode 11.3.1.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.