-3

I am developing an iOS app.I am using auto resize(not auto layout) for designing view.But my deisgn is suitable for iphone 10.It looks stretched.Please guide me to deisgn using auto resize.iphone 10 will only support autolayout?Please refer my screenshots iphone10 ,iphone5.In xib iteself,while i am changing iphone-X it looks like this

Madhu
  • 9
  • 1

2 Answers2

0

In Autoresizing you should do like below picture:

enter image description here

Arash Etemad
  • 1,827
  • 1
  • 13
  • 29
0

It looks like autoresizing is not keeping aspect ratio in iPhone X and newer. So that layout based on autoresizing doesn't look good anymore on these new models.

The workaround I'm using is specifying the aspect ratio I want manually. For example if I want the circular label to stay circular on all devices, instead of turning into elipse, I adjust hight to be equal width manually:

self.frame.size.height = self.frame.size.width
Dharman
  • 30,962
  • 25
  • 85
  • 135
Andrew L.
  • 111
  • 1
  • 11