forked from keske/react-native-easy-gestures
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.ios.js
74 lines (70 loc) · 1.99 KB
/
index.ios.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
import React, { Component } from 'react';
import { AppRegistry, Image, View } from 'react-native';
import Gestures from './lib';
const photo = require('./static/photo.jpg');
export default class Example extends Component {
render() {
return (
<View
style={{
flex: 1,
justifyContent: 'center',
alignItems: 'center',
}}
>
<Gestures
ref={(c) => { this.gestures = c; }}
onStart={(event, styles) => {
// console.log('On Start');
}}
onChange={(event, styles) => {
// console.log('On change');
}}
onEnd={(event, styles) => {
// console.log('On End');
}}
onMultyTouchStart={(event, styles) => {
// console.log('On MultyTouch Start');
}}
onMultyTouchChange={(event, styles) => {
// console.log('On MultyTouch change');
}}
onMultyTouchEnd={(event, styles) => {
// console.log('On MultyTouch End');
}}
onRotateStart={(event, styles) => {
// console.log('On Rotate Start');
}}
onRotateChange={(event, styles) => {
// console.log('On Rotate Change');
}}
onRotateEnd={(event, styles) => {
// console.log('On Rotate End');
}}
onScaleStart={(event, styles) => {
// console.log('On Scale Start');
}}
onScaleChange={(event, styles) => {
// console.log('On Scale Change');
}}
onScaleEnd={(event, styles) => {
// console.log('On Scale End');
}}
style={{
left: 0,
top: 0,
}}
>
<Image
source={photo}
style={{
width: 300,
height: 400,
}}
/>
</Gestures>
</View>
);
}
}
AppRegistry.registerComponent('GesturesExample', () => Example);