Showing
1 changed file
with
3 additions
and
1 deletions
1 | ## 适配的前提 | 1 | ## 适配的前提 |
2 | 2 | ||
3 | -原来设计图的约束数值都是按照iPhone6的设计给的,在项目中都是按照5(4-inch)的数值实际使用的 | 3 | + 原版设计图的约束数值都是按照iPhone6(4.7-inch)的设计给的,在项目中都是按照iPhone5(4-inch)的数值实际使用的 |
4 | 4 | ||
5 | ## 方法一 | 5 | ## 方法一 |
6 | **方法名:** | 6 | **方法名:** |
@@ -8,6 +8,7 @@ | @@ -8,6 +8,7 @@ | ||
8 | `#define LayOutForScaleIPhone6P(offsetForIPhone6) ([DeviceTools is5p5InchPhone] ? (1.294 * offsetForIPhone6) : LayOutForScale(offsetForIPhone6))` | 8 | `#define LayOutForScaleIPhone6P(offsetForIPhone6) ([DeviceTools is5p5InchPhone] ? (1.294 * offsetForIPhone6) : LayOutForScale(offsetForIPhone6))` |
9 | 9 | ||
10 | **适用环境:** | 10 | **适用环境:** |
11 | + | ||
11 | 在没有新的设计图的情况下,项目内的参数都需要这个宏来做处理 | 12 | 在没有新的设计图的情况下,项目内的参数都需要这个宏来做处理 |
12 | 13 | ||
13 | 14 | ||
@@ -17,4 +18,5 @@ | @@ -17,4 +18,5 @@ | ||
17 | `#define LayoutForFitIPhone6P(offsetForIPhone6,offsetForIPhone6P) ([DeviceTools is5p5InchPhone] ? offsetForIPhone6P : LayOutForScale(offsetForIPhone6))` | 18 | `#define LayoutForFitIPhone6P(offsetForIPhone6,offsetForIPhone6P) ([DeviceTools is5p5InchPhone] ? offsetForIPhone6P : LayOutForScale(offsetForIPhone6))` |
18 | 19 | ||
19 | **适用环境:** | 20 | **适用环境:** |
21 | + | ||
20 | 在有iPhone6P新设计图的情况下,需要使用这个方法,第一个参数是:(原来按照iPhone6给的约束),第二个参数是:(新的按照iPhone6P给的约束) | 22 | 在有iPhone6P新设计图的情况下,需要使用这个方法,第一个参数是:(原来按照iPhone6给的约束),第二个参数是:(新的按照iPhone6P给的约束) |
-
Please register or login to post a comment