NOTE: VibrationIOS is being deprecated. Use Vibration instead.

The Vibration API is exposed at VibrationIOS.vibrate(). On iOS, calling this function will trigger a one second vibration. The vibration is asynchronous so this method will return immediately.

There will be no effect on devices that do not support Vibration, eg. the iOS simulator.

Vibration patterns are currently unsupported.

Methods

static vibrate()

@deprecated

Examples

'use strict';

var React = require('react');
var ReactNative = require('react-native');
var {
  StyleSheet,
  View,
  Text,
  TouchableHighlight,
  VibrationIOS
} = ReactNative;

exports.framework = 'React';
exports.title = 'VibrationIOS';
exports.description = 'Vibration API for iOS';
exports.examples = [{
  title: 'VibrationIOS.vibrate()',
  render() {
    return (
      <TouchableHighlight
        style={styles.wrapper}
        onPress={() => VibrationIOS.vibrate()}>
        <View style={styles.button}>
          <Text>Vibrate</Text>
        </View>
      </TouchableHighlight>
    );
  },
}];

var styles = StyleSheet.create({
  wrapper: {
    borderRadius: 5,
    marginBottom: 5,
  },
  button: {
    backgroundColor: '#eeeeee',
    padding: 10,
  },
});
LayoutAnimation.create()
  • References/JavaScript/React Native/APIs

static create(duration, type, creationProp) Helper for creating a config

2025-01-10 15:47:30
LayoutAnimation.configureNext()
  • References/JavaScript/React Native/APIs

static configureNext(config, onAnimationDidEnd?) Schedules an animation

2025-01-10 15:47:30
NetInfo.addEventListener()
  • References/JavaScript/React Native/APIs

static addEventListener(eventName, handler) Invokes the listener whenever

2025-01-10 15:47:30
NetInfo.fetch()
  • References/JavaScript/React Native/APIs

static fetch() Returns a promise that resolves with one of the connectivity

2025-01-10 15:47:30
Animated#stopAnimation()
  • References/JavaScript/React Native/APIs

stopAnimation(callback?) Stops any running animation or tracking. callback is invoked with

2025-01-10 15:47:30
LayoutAnimation#linear
  • References/JavaScript/React Native/APIs

linear: CallExpression

2025-01-10 15:47:30
BackAndroid.exitApp()
  • References/JavaScript/React Native/APIs

static exitApp()

2025-01-10 15:47:30
Animated#getTranslateTransform()
  • References/JavaScript/React Native/APIs

getTranslateTransform() Converts {x, y} into a useable translation transform, e.g.

2025-01-10 15:47:30
Animated#removeListener()
  • References/JavaScript/React Native/APIs

removeListener(id)

2025-01-10 15:47:30
Dimensions.set()
  • References/JavaScript/React Native/APIs

static set(dims) This should only be called from native code by sending

2025-01-10 15:47:30