Reputation: 3166
I am using a UITableView
with static UITableViewCells
. I am using custom cells and also right detail cells. I would like to get the UILabel
within the custom cells to align with the UILabel
within the right detail cells.
I checked within Interface Builder, and it shows the UILabel
in the right detail cell to have the x origin to be 15. Within the custom UITableViewCell
, I set the UILabel
to have the same starting x origin. This works great on iPhones, but when I load the app on an iPad, they aren't aligned properly. The UILabel within the right detail cells appear to have a starting x origin of about 18.
Is there something I can do to ensure the UILabels have the same leading alignment within Interface Builder, or do I need to programmatically set constraints depending on the type of device?
Upvotes: 1
Views: 774
Reputation: 1855
Unfortunately I don't think there's an easy way to make constraints based on Apple's pre-made cells. You'll probably have to go with just programming the constraints manually, or another option is to make your own implementation of a right detail cell and make the constraints the same as your other custom cell.
Upvotes: 1