Today in the project shipped to this question, is in the original xib is suitable for all the iphone screen, but now it is necessary to adapt to the iphone also to adapt to the ipad, make a very big, now in order to achieve this effect, the boss gave me two ways, is on the basis of xib modified, Directly on the code, not much to say.
The first way: Modify the Xib file (source code)
1. This thing will appear in the xib of the screen that fits all iphone:
<variation key= "Default" >
<mask key= "Subviews" >
<exclude reference= "Odz-pl-lf9"/>
</mask>
<mask key= "Constraints" >
<exclude reference= "C4C-3V-HBQ"/>
<exclude reference= "au7-kx-z5f"/>
</mask>
</variation>
<variation key= "Heightclass=regular-widthclass=compact" >
<mask key= "Subviews" >
<include reference= "Odz-pl-lf9"/>
</mask>
<mask key= "Constraints" >
<include reference= "C4C-3V-HBQ"/>
<include reference= "au7-kx-z5f"/>
</mask>
</variation>
Replace All "Heightclass=regular-widthclass=compact" with "Default", and you can change the Any-any screen to fit.
The effect before is on the iphone's adaptation effect:
The effect of modifying the screen after Any-any:
The second way: more cumbersome, it is recommended not to use this method: (Check this control, and then choose Any-any) The iphone screen to delete things can be::
The corresponding constraints also need to be, make the same changes, can also achieve the same effect::
Finally, this effect can be achieved, hoping to help people in need:
iOS ipad and iphone xib between the matching all screens