1

I have UITableViewCell with Xib file. Everything looked fine until i tried my cell with plus size iPhones such as iPhone 7 Plus, 8 Plus and XS Max.

Cell height is 476px and it's contentView height is 475,5 as usual. However, when i tried plus sizes cells contentView height is 475,67px. What da heck is wrong with Interface Builder?

iPhone SE, 7, 8, X, XR

iPhone SE, 7, 8, X, XR

iPhone 7 Plus, 8 Plus, XS Max

iPhone 7 Plus, 8 Plus, XS Max

Kemal Can Kaynak
  • 1,638
  • 14
  • 26

1 Answers1

0

If this tiny margin is causing such a big trouble then there are a couple workarounds you could do to fix it.

** Both workarounds will require code checking for plus sizes iPhones. Check here. Detect if the device is iPhone X

  1. Create a separate cell to use it with plus sizes iPhones and set it's height to whatever is adueqate.

  2. Or manage (heightForRowAtIndexPath) to return the desired height for plus sizes iPhones.

Ahmed Elashker
  • 1,001
  • 1
  • 8
  • 17