0

I get a TableView.I use custom cells in some rows,and some cells use UITableViewCellStyleValue1.I set custom cell in XIB by autoLayout.

enter image description here

But on iPhone 6plus, UITableViewCellStyleValue1 the textLabel.frame = (20 11; 45 18),the frame is (15 11; 45 18) on other devices.So you can see the label is not on the right place.

Is there a proper way to change the frame of UITableViewCellStyleValue1 textLabel?

Thanks

vaibhav
  • 4,038
  • 1
  • 21
  • 51
Randall Wang
  • 1,007
  • 3
  • 10
  • 24

1 Answers1

0

Maybe it's something to do with a constraint to margin, if you change your leading constraint of your label for your custom cell to look the image below. Also this question looks similar to your problem, UITableViewCell with autolayout left margin different on iPhone and iPad.

enter image description here

Community
  • 1
  • 1
JingJingTao
  • 1,760
  • 17
  • 28