mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-03-27 22:54:46 +08:00
Removed 'screen' option from snapshot API
Summary:Unfortunately the 'screen' option in the `UIManager.takeSnapshot` API appears to work only on the iOS simulator, not on an actual device. This diff removes the 'screen' option until a solution can be found that works on the device. (Taking a snapshot of the window still works fine - it just won't include the status bar, etc.) Reviewed By: javache Differential Revision: D2971091 fb-gh-sync-id: 026b9d4eb2f59f686f58c18a16381ff325df612b shipit-source-id: 026b9d4eb2f59f686f58c18a16381ff325df612b
This commit is contained in:
committed by
facebook-github-bot-5
parent
f538032888
commit
4b4455f827
@@ -44,7 +44,7 @@ var ScreenshotExample = React.createClass({
|
||||
|
||||
takeScreenshot() {
|
||||
UIManager
|
||||
.takeSnapshot('screen', {format: 'jpeg', quality: 0.8}) // See UIManager.js for options
|
||||
.takeSnapshot('window', {format: 'jpeg', quality: 0.8}) // See UIManager.js for options
|
||||
.then((uri) => this.setState({uri}))
|
||||
.catch((error) => alert(error));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user