React Native小知识点记录
2024-08-30 23:40:15
1>查看 RN 的所有历史版本:
npm view react-native versions -json
2>查看 RN 的当前版本:
npm view react-native version -json
3>平台判断执行方法:
const Toolbar = Platform.select({
android: () => renderToolbarAndroid(),
ios: () => renderToolbarIOS()
});
4>分隔线的高度不能写死0.5,否则有些机型会有问题,如下所示:
正确写法如下:
container: {
backgroundColor: 'white',
borderTopWidth:StyleSheet.hairlineWidth,
borderTopColor:'#ddd'
},
5>View固定屏幕底部:
需要将view套在一个父view上,设置style如下:
addArticelBottmViewStyle: {
position: 'absolute',
width: Space.kScreenWidth,
height: ,
bottom: ,
right: // 可不要
}
持续更新哟!!!
最新文章
- 虚拟机linux上网问题
- POJ 2418 字典树
- Struts2(十一)OGNL标签三与Struts2标签
- html5调用手机摄像头,实现拍照上传功能
- 如何在WPF应用程序中使用视频处理控件TVideoGrabber
- iOS多线程 GCD
- 计算CRC校验值(CRC16和CRC32)(网络传输检验)
- Codevs No.3147 矩阵乘法2
- dataGuard主备库角色切换
- CSS background-repeat 属性
- mysqli 启动出错
- ASP.NET Core 中使用EF Core 将实体映射到数据库表的方法(SQL Server)
- maven加载本地jar包到repository
- BZOJ3526[Poi2014]Card——线段树合并
- 剑指offer(31)1~n整数中1出现的次数
- Servlet组件之 jsp 技术
- Nhibernate + MySQL 类型映射
- Finding the source of signals on Linux with strace, auditd, or systemtap
- 从客户端(SeekingJobs=";<;B>;&#183;<;/B>; 物流规划,<;B>;&#183;<;/...";)中检测到有潜在危险的 Request.Form 值。
- 从零开始搭建linux下laravel 5.5所需环境(二)
热门文章
- 解决Python中出现的问题: “You are using pip version 9.0.1, however version 19.2.3 is available. You should consider upgrading via the &#39;python -m pip install --upgrade pip&#39; command.”
- P2057 善意的投票 最小割理解
- python模块 加密服务hashlib,hmac
- P1052 过河 题解
- HTML5新特性——1 HTML5音频
- 记录一下UILabel加载富文本 iOS
- 接口调用实现类&;&; 为什么Autowired定义在接口上
- CF311B Cats Transport(斜率优化)
- HDU 6042 - Journey with Knapsack | 2017 Multi-University Training Contest 1
- 【线性代数】3-6:四个子空间的维度(Dimensions of the Four Subspaces)