Constraints withVisualFormat

Hello,

I've been trying to wrap my head arround NSLayoutConstraint withVisualFormat and I'm having a heck of a time. I have three lables and I want to order them in a specific format but I cant seem to get it. I'm doing this in a custom UITableViewCell.



I have tried to draw the cell layout below. How would I accomplist this?


--------------------------------------------------------------------------------
(10 padding)Name
                                                           ColorName(10 padding)
(10 padding)Description
--------------------------------------------------------------------------------

Thanks!

Have you defined a xib for the cell prototype ?


If so, if I understand your need :

- position the 3 labels approximately where you need them

- Control-drag on name label to the top left of the cell, and select leading and top ; set the value in Size inspector to 10 for leading

- Control-drag on Description label to Name, and shift click for verticcal spacing and leading ; check in inspector that leading constant is 0

- Control-drag on ColorName label to the right of the cell, and select trailing and center vertically in view ; set the value in Size inspector to 10 for trailing

Constraints withVisualFormat
 
 
Q