Add support for native animated events on iOS

Summary:
This adds native support for `Animated.event` on iOS.

**Test plan**
Tested in the native animated UIExplorer example that it works properly like on Android.
Closes https://github.com/facebook/react-native/pull/9598

Differential Revision: D4110331

fbshipit-source-id: 15748d23d0f475f2bcd1040ca3dca33e2620f058
This commit is contained in:
James Ide
2016-11-01 03:58:53 -07:00
committed by Facebook Github Bot
parent 0fe1c7a9ff
commit fc11a5fde8
9 changed files with 215 additions and 18 deletions
@@ -191,6 +191,7 @@ class EventExample extends React.Component {
<Animated.ScrollView
horizontal
style={{ height: 100, marginTop: 16 }}
scrollEventThrottle={16}
onScroll={
Animated.event([{
nativeEvent: { contentOffset: { x: this.state.scrollX } }
@@ -462,6 +463,14 @@ exports.examples = [
);
},
},
{
title: 'Animated events',
render: function() {
return (
<EventExample />
);
},
},
{
title: 'Internal Settings',
render: function() {
@@ -470,13 +479,4 @@ exports.examples = [
);
},
},
{
title: 'Animated events',
platform: 'android',
render: function() {
return (
<EventExample />
);
},
},
];