Igor Voitenko
Igor Voitenko

Reputation: 305

Different constraints on iPhone 7 plus and other iPhones

I'm using UiTableView with static cell's and right detail table view cell style and I found that on all iPhone's except iPhone 7 plus leading space to left label equals 16 and on iPhone 7 plus it equals 20. Screenshots of same cell in different iPhones: enter image description here

enter image description here

I need to create custom cell with label that must have same leading spacing and I thought I can use size classes for it, but how if all iPhones have regular height and compact width in portrait mode (app use only portrait mode). I know that this problem can be solved programmatically, but there is must be some way to solve it via interface builder. Screenshots of my custom cell and right detail style cell on iPhone 7 plus (my custom cell at the top have leading constraint equals 16, but it have to be 20 for 7 plus): enter image description here

enter image description here

Upvotes: 0

Views: 275

Answers (1)

Jerry
Jerry

Reputation: 4480

This is due to the margin of the top level view, which is set by the system to the values you described. You can override the margins of the view to be the same on all devices.

Upvotes: 1

Related Questions