iOS Use Vary For Traits Between iPhone Sizes

2019-03-02 21:26发布

问题:

I have a button that I want to be different widths depending on which kind of iPhone is being used. Obviously a larger width for the 7 Plus, and smaller on down the line. I click the button, click Vary for Traits, choose Height, change constraints for each iPhone, then click Done Varying and build, but it always keeps whatever the last constraint I edited was, no matter which device I run it on.

回答1:

Vary For Traits has nothing to do with different iPhone sizes. All iPhones (in portrait) have identical traits; there is nothing to vary.