I am having trouble getting constraints to work on my UITableViewCell
. The cell currently has 2 text fields and a button with an image.
iPhone X Storyboard
Currently without constraints the cell content doesn't change position no matter which device I test it on. For instance on an iPad it looks like this
iPad storyboard
When I add constraints it looks like it is going to work, but then when I run the app the content is all screwed up.
Here are screenshots of what it looks like with constraints, and what constraints I am using.
iPhone X Simulator with constraints
Can anyone tell me which specific constraints I need to make it look like this on all devices?
iPhone X Simulator without constraints
I haven't had issues with constraints with the rest of the app, but for some reason Autolayout constraints in cells are evading my understanding.
Thank you!
UPDATE
I was able to fix the issue with the answers from this question Autolayout is ignored in Custom UITableViewCell
After that the constraints @leedex suggested worked wonderfully.