GithubHelp home page GithubHelp logo

reactnativescreenutil's Introduction

ReactNativeScreenUtil

ReactNative屏幕工具适配类 直接导入引用即可.
新增iPhoneX适配, 让你不用升级ReactNative即可适配iPhoneX.
此设计类以iPhone6为基准,可自行修改.
如果各位有更好的适配或者其他适合作为工具的方法,欢迎提issue分享给大家。

个人也已经添加了一些其他常用方法,比如判断字符串(对象,数组)是否为空,时间戳转换 , AsyncStorage 的增删改查等, 觉得有的方法用不上可以手动删除,在此只做整理,方便日后使用

相关链接:

适配iPhoneX的效果及相关方法: http://blog.csdn.net/u011272795/article/details/78592605

屏幕适配工具类使用方法: http://blog.csdn.net/u011272795/article/details/73824558

2018/8/15更新:

字体适配添加了是否根据手机文字缩放系数来缩放字体,避免在每个text都写相应的设置方法,详情请查看setSptext方法

2018/8/15更新:

优化了适配方法setSptext和scaleSize,
添加了scaleHeight方法,根据不同手机的高度不同来进行适配,使尺寸更加合适

2018/7/12更新:

调整了适配方法setSptext和scaleSize,
最新的屏幕适配方法在android上的效果非常好,iOS未测试,如果iOS上效果不好,请使用最初的版本。
添加了判断目标是否为空的方法,详情请查阅工具中的isEmpty方法.

reactnativescreenutil's People

Contributors

lizhuoyuan avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.