简体   繁体   中英

Scale design for iPad Pro

I'm developing an app for the iPad. When installed on the iPad pro, the layout elements are all too tiny. Since the iPad pro is the same proportion as the older iPads, is there a way to simply scale everything up and include @3x assets?

I'm also a bit confused that the size classes are the same as well. I have a button that is 200 x 200 pixels on the iPad Retina (perfect) too small on the iPad pro.

Thank you for your time.

I found a solution by following a few steps:

  • made my subview 1:1 aspect ratio to itself
  • added a background view that had left/top/right/bottom constraints set to 0
  • added an aspect ratio constraint to the background and the button

The above sizes the button properly for both devices but the position was off

  • for x/y placement, I added 2 constraints to the superview (center vertically and center horizontally)
  • Using multipliers in InterfaceBuilder I was able to position the button properly

Hope this helps someone who runs into the same issue

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM