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,
  },
});
Animated.multiply()
  • References/JavaScript/React Native/APIs

static multiply(a, b) Creates a new Animated value composed from two Animated

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

interpolate(config) Interpolates the value before updating the property, e.g. mapping 0-1 to 0-10.

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
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
AsyncStorage.getItem()
  • References/JavaScript/React Native/APIs

static getItem(key, callback?) Fetches key and passes the result

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

static open(options) Opens the standard Android date picker dialog.

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

linear: CallExpression

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

static getPixelSizeForLayoutSize(layoutSize) Converts a layout size (dp)

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

constructor(nativeNotif) You will never need to instantiate PushNotificationIOS yourself. Listening

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

removeListener(id)

2025-01-10 15:47:30