Search code examples
iosswiftxcodenslayoutconstraint

Constraints Problems with table view cell


Table View image

I have problems with constraints in table view cell. As you can see in the image above , I tried to constrain the label on the far right so that label will be closer to the right right edge. But that isn't reflecting on the ipad in preview. Whats wrong? and How do solve this problem ? Thanks for any help !


Solution

  • The prototype cell in the storyboard is just that: a prototype. It isn't "real". It will be used as a cell when the app runs, and layout will occur. But the Preview in the storyboard in Xcode (in your version of Xcode) doesn't reflect any of that.

    So the only way to see the effect of your constraints is to build and run the app in an appropriate Simulator.