2

Building a table cell. Seems straight forward. I've done this before. However, on this specific table all my dimensions don't work, despite seemingly not obscure. Blue lines Blue lines Chaos

My cell has a class of transaction cell. enter image description here

It's weird. What am I missing? I've gone through the dimensions like 50 times. When I remove all the dimensions and just place the buttons and labels on the cell they stay as they are, but obviously don't work across all screens.

user1093111
  • 1,091
  • 5
  • 21
  • 47
  • give fix width constraint. – KKRocks Jun 20 '17 at 13:47
  • @KKRocks To the cell? – user1093111 Jun 20 '17 at 13:50
  • to price label . – KKRocks Jun 20 '17 at 13:54
  • @KKRocks No such luck. I did used to have it pinned to the right side. The pinned to left margin was just me playing around. Thanks for your response. Obviously, this is a hard to debug question, given the info. – user1093111 Jun 20 '17 at 13:57
  • This might help you https://stackoverflow.com/a/30300870/1422333 . Also make sure you have override `func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath)` of `UITableViewDelegate` – Zell B. Jun 20 '17 at 13:57
  • @ZellB. implemented. The height did change, however the data is still bunched to the top left. What more information do you need? It just seems straight forward – user1093111 Jun 20 '17 at 14:04
  • @user1093111 your constraints should be wrong. Check the debug console and look for a broken constrains – Zell B. Jun 20 '17 at 15:13
  • set horizontal content hugging priority to 251 for label which you want to grow. – KKRocks Jun 20 '17 at 15:23

1 Answers1

0

After reading the comments, it seems that you already set the height of the cell, and the constraints, so everything should be fine. But if you still need help, i'd check the constraints of Restaurant : set it to Top and Leading of the cell, and set size and width. After that, set the constraints for price : leading to Restaurant, Top and trailing to cell and a constant height.At least, Dining out : vertical space to Restaurant, the rest will be optional.