- 授权协议: 未知
- 开发语言: Objective-C JavaScript
- 操作系统: 跨平台
- 软件首页: https://github.com/pwmckenna/react-native-motion-manager
软件介绍
react-native-motion-manager 是 CMMotionManager 对 react-native 的封装, 是 React Native 的动力传感器(加速计,陀螺计,磁力计)组件。
添加到你的项目:
npm install react-native-motion-manager@latest --save在 XCode 的项目导航右击
Libraries➜Add Files to [your project's name]转到
node_modules➜react-native-motion-manager然后添加RNMotionManager.xcodeproj在 XCode 项目导航选择你的项目,添加
libRNMotionManager.a到你项目的Build Phases➜Link Binary With Libraries在项目导航中点击
RNMotionManager.xcodeproj然后转向Build Settings标签。确保 'All' 勾选上 (替代 'Basic')。查看Header Search Paths确保它包括$(SRCROOT)/../react-native/React和$(SRCROOT)/../../React- ,把两个都标记为recursive运行你的项目 (
Cmd+R)
Api
安装
var {
Accelerometer,
Gyroscope,
Magnetometer
} = require('NativeModules');
var {
DeviceEventEmitter // will emit events that you can listen to
} = React;Accelerometer
Accelerometer.setAccelerometerUpdateInterval(0.1); // in seconds
DeviceEventEmitter.addListener('AccelerationData', function (data) {
/**
* data.acceleration.x
* data.acceleration.y
* data.acceleration.z
**/
});
Accelerometer.startAccelerometerUpdates(); // you'll start getting AccelerationData events above
Accelerometer.stopAccelerometerUpdates();Gyroscope
Gyroscope.setGyroUpdateInterval(0.1); // in seconds
DeviceEventEmitter.addListener('GyroData', function (data) {
/**
* data.rotationRate.x
* data.rotationRate.y
* data.rotationRate.z
**/
});
Gyroscope.startGyroUpdates(); // you'll start getting AccelerationData events above
Gyroscope.stopGyroUpdates();Magnetomer
Magnetometer.setAccelerometerUpdateInterval(0.1); // in seconds
DeviceEventEmitter.addListener('MagnetometerData', function (data) {
/**
* data.magneticField.x
* data.magneticField.y
* data.magneticField.z
**/
});
Magnetometer.startMagnetometerUpdates(); // you'll start getting AccelerationData events above
Magnetometer.stopMagnetometerUpdates();
运营其实很简单:互联网运营进阶之道
郑文博 / 人民邮电出版社 / 2018-2 / 49.80元
为了帮助从事运营或即将从事运营的广大读者更好、更快地了解运营、学习运营、入职运营,本书详细阐述运营对于用户、企业的帮助,同时以单个理论点 单个实战案例的方式详细分析了社群运营、活动运营、新媒体运营、内容运营、渠道运营、精细化运营、场景化运营、用户化运营、商业化运营等模块及运营工作、渠道整合、社群知识、渠道优化、SOP流程等细节,力求让读者在求职路上快速上手,在迷茫途中快速定位。 《运营其实很简单 ......一起来看看 《运营其实很简单:互联网运营进阶之道》 这本书的介绍吧!
