0

I'm creating a very simple project, but I can't make the constraints work perfectly both in iPhones and iPad, there's this wierd behavior when I execute the app in an iPad simulator (images below).

I read that there's some differences in the margins between iphones and ipad and even though I tried to find help I couldn't figure it out how to solve this problem.

It's seems like the problem is in the View Margins... I tried to put this code in my appDelegate:

UITableViewCell.appearance().preservesSuperviewLayoutMargins = true
UITableViewCell.appearance().contentView.preservesSuperviewLayoutMargins = true

that I founded in this link UITableViewCell with autolayout left margin different on iPhone and iPad

but doesn't worked!

enter image description here

enter image description here

enter image description here

Thanks in advanced for any help.

Community
  • 1
  • 1
Leonardo Lobato
  • 1,007
  • 1
  • 9
  • 22

1 Answers1

1

Silly Mistake, I didn't set in DEVICES to Universal.

enter image description here

Leonardo Lobato
  • 1,007
  • 1
  • 9
  • 22