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

setHidden(hidden, animation?)

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

isConnectionExpensive Available on Android. Detect if the current active connection is metered or not. A network is classified as metered when

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

static scheduleLocalNotification(details) Schedules the localNotification

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

static roundToNearestPixel(layoutSize) Rounds a layout size (dp) to the nearest

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

static multiRemove(keys, callback?) Delete all the keys in the keys

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

static setApplicationIconBadgeNumber(number) Sets the badge number for the

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

static get(dim) Initial dimensions are set before runApplication

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

static registerComponent(appKey, getComponentFunc)

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

static alert(title, message?, callbackOrButtons?, type?) Creates a popup

2025-01-10 15:47:30