<Ignore_js_op> Source code download: http://code.662p.com/view/13343.html author ymiddle, source code TopNewsIOS, news headlines IOS version integrated React remote offline package,Toutiao IOS + ReactNative hybrid version (Layout adopts Masonry)
Use Masonry for ios ui AutoLayout adaptation, initially implement offline package download of React Native, and then decompress it to the sandbox directory for future IOS plug-ins for chemical engineering! IOS Native engineering integration React Native 1. Get the code from https://github.com/facebook/react-native.gitpull. Then run npm install in the CD directory (provided that you have installed the node environment) 2. drag React under the React directory. xcodeproj to the native project, other needs to go to the Libary directory React/React. xcodeproj Libraries/Image/RCTImage. xcodeproj Libraries/Network/RCTNetwork. xcodeproj Libraries/Text/RCTText. xcodeproj Libraries/Vibration/RCTVibration. xcodeproj Libraries/WebSocket/RCTWebSocket. xcodeproj Libraries/LinkingIOS/RCTLinking. xcodeproj Libraries/Settings/RCTSettings. xcodeproj 3. add the corresponding. file a 4. open your project file, select Build Settings, Search for Header Search Paths, and add the directory where the React library is located (check the recursive option) 5. create a separate react native project and create UI functions. 6. use the react-native bundle -- entry-file index command in the react native project. ios. js -- bundle-output. /bundle/news. ios. jsbundle -- platform ios -- assets-dest. /bundle -- dev true package out offline jsbundle 7. compress the file into a zip file on the server so that you can download it dynamically, decompress it, and load the offline jsbunle through the path search. For details, see module/settings/ReactController. m. For news, the API is easier to find. & amp; #128516; you can also watch news and entertainment while doing it. This project will be continuously updated. Why not? If you have any questions, please give me more comments!
|