From c0991af077693d2d53918c8e2c3ce87bda1bc974 Mon Sep 17 00:00:00 2001
From: Travis CI
Example usage:
accessibilityLabel - Custom string to display for accessibility.
accessible - Whether this element should be revealed as an accessible -element.
capInsets - When the image is resized, the corners of the size specified +},
Custom string to display for accessibility.
Whether this element should be revealed as an accessible element.
When the image is resized, the corners of the size specified by capInsets will stay a fixed size, but the center content and borders of the image will be stretched. This is useful for creating resizable -rounded buttons, shadows, and other resizable assets. More info:
testID - A unique identifier for this element to be used in UI Automation +rounded buttons, shadows, and other resizable assets. More info on +Apple documentation
uri is a string representing the resource identifier for the image, which
+could be an http address, a local file path, or the name of a static image
+resource (which should be wrapped in the required('image!name') function).
A unique identifier for this element to be used in UI Automation testing scripts.
Displaying images is a fascinating subject, React Native uses some cool tricks to make it a better experience.
If you don't give a size to an image, the browser is going to render a 0x0 element, download the image, and then render the image based with the correct size. The big issue with this behavior is that your UI is going to jump all around as images load, this makes for a very bad user experience.
In React Native, this behavior is intentionally not implemented. It is more work for the developer to know the dimensions (or just aspect ratio) of the image in advance, but we believe that it leads to a better user experience.
A common feature request from developers familiar with the web is background-image. To handle this use case, simply create a normal <Image> component and add whatever children to it you would like to layer on top of it.
Handle push notifications for your app, including permission handling and +icon badge number.
To get up and running, configure your notifications with Apple +and your server-side system. To get an idea, this is the Parse guide.
Sets the badge number for the app icon on the home screen
Gets the current badge number for the app icon on the home screen
Attaches a listener to remote notifications while the app is running in the +foreground or the background.
The handler will get be invoked with an instance of PushNotificationIOS
Requests all notification permissions from iOS, prompting the user's +dialog box.
See what push permissions are currently enabled. callback will be
+invoked with a permissions object:
alert :booleanbadge :booleansound :booleanRemoves the event listener. Do this in componentWillUnmount to prevent
+memory leaks
An initial notification will be available if the app was cold-launched +from a notification.
The first caller of popInitialNotification will get the initial
+notification object, or null. Subsequent invocations will return null.
You will never need to instansiate PushNotificationIOS yourself.
+Listening to the notification event and invoking
+popInitialNotification is sufficient
An alias for getAlert to get the notification's main message string
Gets the sound string from the aps object
Gets the notification's main message from the aps object
Gets the badge count number from the aps object
Gets the data object on the notif