Switch#testID

testID string Used to locate this view in end-to-end tests.

Switch#onValueChange

onValueChange function Invoked with the new value when the value changes.

Switch#onTintColor

iosonTintColor color Background color when the switch is turned on.

Switch#disabled

disabled bool If true the user won't be able to toggle the switch. Default value is false.

StyleSheet.create()

static create(obj) Creates a StyleSheet style reference from the given object.

StyleSheet#hairlineWidth

hairlineWidth: CallExpression This is defined as the width of a thin line on the platform. It can be used as the thickness of a border or division between two elements. Example: { borderBottomColor: '#bbb', borderBottomWidth: StyleSheet.hairlineWidth } This constant will always be a round number of pixels (so a line defined by it look crisp) and will try to match the standard width of a thin line on the underlying platform. However, you should not rely on it being a constant size,

StyleSheet#flatten

flatten: CallExpression Flattens an array of style objects, into one aggregated style object. Alternatively, this method can be used to lookup IDs, returned by StyleSheet.register. NOTE: Exercise caution as abusing this can tax you in terms of optimizations. IDs enable optimizations through the bridge and memory in general. Refering to style objects directly will deprive you of these optimizations. Example: var styles = StyleSheet.create({ listItem: { flex: 1, fontSize: 16, co

Style

React Native doesn't implement CSS but instead relies on JavaScript to let you style your application. This has been a controversial decision and you can read through those slides for the rationale behind it. Declare Styles The way to declare styles in React Native is the following: var styles = StyleSheet.create({ base: { width: 38, height: 38, }, background: { backgroundColor: '#222222', }, active: { borderWidth: 2, borderColor: '#00ff00', }, }); StyleSheet.c

StatusBarIOS#setStyle()

setStyle(style, animated?)

StatusBarIOS#setNetworkActivityIndicatorVisible()

setNetworkActivityIndicatorVisible(visible)