0

I try to build an iOS app with auto layout.

I had created tableView with tableViewCell, and there are textField and button inside the cell.

I try to use constraints to make it universal, but it works only for the iPhone size, for some reason the button constraint button.trailing equal superview.trailing Margin not work for the iPad size , and for 1/3 iPad size

Pictures for reference enter image description here enter image description here

Lee
  • 850
  • 11
  • 23
Haim Cohen
  • 11
  • 4

1 Answers1

0

First of all you should give leading,trailing,top,bottom to tableView with its superview,then give leading,trailing,top,bottom to textfield and button, give their height but constant should not be equal, height constant must be >/,in tableView delegate method you need to return height for row according to device compatibility(for iPhone and iPad).