原创 ReactNative 返回上層界面刷新數據( A -> B -> A)

需求:A 界面跳轉到B 界面再返回A 界面時需要刷新數據或者做一些其他處理,ReactNative 沒有類似iOS的viewWillDisappear生命週期,只能自己處理。 首先引入 ReactNative的import { Devi

原创 ReactNative "___darwin_check_fd_set_overflow"

Xcode報 Undefined symbols for architecture x86_64: "___darwin_check_fd_set_overflow", referenced from: _RAND_poll in lib

原创 ReactNative 監聽Android的物理返回事件!

import { Platform, BackHandler } from "react-native"; componentWillMount() { if (Platform.OS === "android") {

原创 ReactNative Echarts實現隱藏x軸,y軸,刻度線,網格

import Echarts from "native-echarts"; this.state = { contentArr: [this.props.index], // 折線圖數據 option:

原创 ReactNative 原生日期picker,由於項目需要自己寫了一個。

<MCDatePicker // 默認日期 normalDate={2020/11/09} // 是否隱藏 isHide={this.state.isShow} // 選擇完回調 getReturnValue

原创 HttpServlet GET請求 POST請求

GET Map<String, Object> map = new HashMap<String, Object>(); String type = req.getParameter("type

原创 [react-native]- NativeModule: AsyncStorage is null.

將:import AsyncStorage from '@react-native-community/async-storage' 改爲:import { AsyncStorage } from "react-native"

原创 Swift - 異步執行閉包 | Closure use of non-escaping parameter 'xxx' may allow it to escape

新版的Swift閉包做參數默認是@noescaping,不再是@escaping。所以如果函數裏異步執行該閉包,要添加@escaping。否則報錯: . Parameter '***' is implicitly non-escaping

原创 Alamofire4.9.1 使用

Alamofire.request("https://httpbin.org/get").responseJSON { response in print("Request: \(String(describing:

原创 React Native 第三方組件UI類

* [React-Native-Elements](https://link.jianshu.com?t=https://github.com/react-native-community/React-Native-Elements) 一組

原创 ReactNative 原生地址picker,由於項目需要自己寫了一個。

// --------------------------------------------------- // --------------------- 調用方法 --------------------- // ----

原创 ReactNative command+s 不更新UI界面 只需要開啓實時重載 command + m 就可以了! 剛開始弄RN就碰到這個坑!

只需要開啓實時重載 command + m 就可以了! 剛開始弄RN就碰到這個坑!

原创 [iOS功能]- 視頻測試地址

// 20分鐘的視頻資源 _urlStr = @"http://220.249.115.46:18080/wav/Lovey_Dovey.mp4"; _urlStr = @"http://220.249.115.46:18080/wav

原创 pod使用指定版本

pod 'AFNetworking' //不顯式指定依賴庫版本,表示每次都獲取最新版本 pod 'AFNetworking', '~>0' //高於0的版本,寫這個限制和什麼都不寫是一個效果