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

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

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

static registerComponent(appKey, getComponentFunc)

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

Presets: ObjectExpression

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

static addEventListener(type, handler) Attaches a listener to remote or

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

removeEventListener(type, handler) Remove a handler by passing the change event type and the

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

static removeItem(key, callback?) Returns a Promise object.

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

static measureLayout(relativeToNativeNode, onSuccess, onFail) Like measure()

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

static prompt(title, message?, callbackOrButtons?, type?, defaultValue?) Prompt

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

static alert(title, message?, buttons?, type?)

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

static popInitialNotification() DEPRECATED: An initial notification will

2025-01-10 15:47:30