Showing
1 changed file
with
4 additions
and
2 deletions
| @@ -66,9 +66,11 @@ ScreenUtil.instance = ScreenUtil(width: 750, height: 1334, allowFontScaling: tru | @@ -66,9 +66,11 @@ ScreenUtil.instance = ScreenUtil(width: 750, height: 1334, allowFontScaling: tru | ||
| 66 | 66 | ||
| 67 | 传入设计稿的px尺寸: | 67 | 传入设计稿的px尺寸: |
| 68 | 68 | ||
| 69 | -根据屏幕宽度适配 width: ScreenUtil().setWidth(540), | 69 | +根据屏幕宽度适配 `width: ScreenUtil().setWidth(540)`, |
| 70 | 70 | ||
| 71 | -根据屏幕高度适配 height: ScreenUtil().setHeight(200), | 71 | +根据屏幕高度适配 `height: ScreenUtil().setHeight(200)`, |
| 72 | + | ||
| 73 | +也可以使用 `ScreenUtil.getInstance()` 来替代`ScreenUtil()` , 例如:`ScreenUtil.getInstance().setHeight(25)` | ||
| 72 | 74 | ||
| 73 | **注意** | 75 | **注意** |
| 74 | 76 |
-
Please register or login to post a comment