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,
  },
});
NetInfo#isConnected
  • References/JavaScript/React Native/APIs

isConnected Available on all platforms. Asynchronously fetch a boolean to determine internet connectivity.

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

flatten: CallExpression Flattens an array of style objects, into one aggregated style object. Alternatively

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

static getApplicationIconBadgeNumber(callback) Gets the current badge number

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

getMessage() An alias for getAlert to get the notification's main message string

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

static runAfterInteractions(task) Schedule a function to run after all interactions

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

static decay(value, config) Animates a value from an initial velocity to

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

easeInEaseOut: CallExpression

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

static dismissedAction() The dialog has been dismissed.

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

static get() Returns the device pixel density. Some examples: PixelRatio

2025-01-10 15:47:30