xcode - The iOS rotation with auto layout -
i followed swift ios tutorial on itunes (stanford university cs193p)
i followed first example make calculator.
1.i add button screen , set auto layout attributes.

2.then warning comes out, , update frames constraints.

3.the start simulator, seems works fine.

- but when rotated screen, number buttons heap together.

i know must made small mistakes, followed tutorial. because new ios, , thought problem hard describe, put there. hopefully, there 1 solve problem.
you have problem because made constraints using wany hregular size class. when rotate landscape, height compact, , don't have constraints size class (so buttons have {0,0} origin). should make separate constraints size class, 3 rows of 4 rather 4 rows of 3 fit shorter space better.
Comments
Post a Comment