非常教程

React native参考手册

APIs

Easing

Easing模块实现通用缓动功能。Animate.timing()使用此模块传达动画中物理上可信的动作。

你可以在http://easings.net/上找到一些常用缓动函数的可视化。

预定义的动画

Easing模块通过以下方法提供了几个预定义的动画:

  • back 提供了一个简单的动画,在向前移动之前对象略微回退
  • bounce 提供了一个弹跳动画
  • ease 提供了一个简单的惯性动画
  • elastic 提供简单的弹簧交互

标准功能

提供了三种标准缓动功能:

  • linear
  • quad
  • cubic

poly功能可用于实现四次,五次和其他更高功率的功能。

附加功能

附加的数学函数由以下方法提供:

  • bezier 提供三次贝塞尔曲线
  • circle 提供循环功能
  • sin 提供正弦函数
  • exp 提供指数函数

以下帮助程序用于修改其他缓动功能。

  • in 运行缓动功能
  • inOut 使任何缓动功能对称
  • out 向后运行缓动功能

方法

static step0(n)

一个步进函数,返回1的任何正值n

static step1(n)

步进功能,如果n大于或等于1则返回1。

static linear(t)

线性函数,f(t) = t。位置与经过时间一一对应。

http://cubic-bezier.com/#0,0,1,1

static ease(t)

一种简单的惯性相互作用,类似于一个物体慢慢加速到速度。

http://cubic-bezier.com/#.42,0,1,1

static quad(t)

二次函数,f(t) = t * t。位置等于经过时间的平方。

http://easings.net/#easeInQuad

static cubic(t)

一个三次函数,f(t) = t * t * t。位置等于经过时间的立方。

http://easings.net/#easeInCubic

static poly(n)

功能函数。位置等于经过时间的N次方。

n = 4: http://easings.net/#easeInQuart n = 5: http://easings.net/#easeInQuint

static sin(t)

正弦函数。

http://easings.net/#easeInSine

static circle(t)

循环功能。

http://easings.net/#easeInCirc

static exp(t)

指数函数。

http://easings.net/#easeInExpo

static elastic(bounciness)

一个简单的弹性相互作用,类似于一个来回摆动的弹簧。

默认弹性是1,超过一次。0的跳动完全没有超调,而N> 1的跳动会超过N次。

http://easings.net/#easeInElastic

沃尔夫勒姆情节:

  • http://tiny.cc/elastic_b_1 (bounciness = 1, default)
  • http://tiny.cc/elastic_b_3 (bounciness = 3)

static back(s)

与使用Animated.parallel()创建该对象动画小幅作为动画开始一个简单的效果。

Wolfram剧情:

  • http://tiny.cc/back_default (s = 1.70158, default)

static bounce(t)

提供简单的弹跳效果。

http://easings.net/#easeInBounce

static bezier(x1, y1, x2, y2)

提供一个三次贝塞尔曲线,相当于CSS Transitions' transition-timing-function

一个有用的可视化三次贝塞尔曲线的工具可以在http://cubic-bezier.com/找到。

static in(easing)

向前运行缓动功能。

static out(easing)

向后运行缓动功能。

static inOut(easing)

使任何缓动功能对称。缓动功能将持续一半的持续时间,然后在剩余的持续时间后退。

React native

React Native 是一个 JavaScript 的框架,用来撰写实时的、可原生呈现 iOS 和 Android 的应用。

主页 https://facebook.github.io/react-native/
源码 https://github.com/facebook/react-native
发布版本 0.49

React native目录

1.开始 | Getting Started
2.指南 | Guides
3.APIs
4.组件:ActivityIndicator | Components: ActivityIndicator
5.组件:按钮 | Components: Button
6.组件:CheckBox | Components: CheckBox
7.组件:DatePickerIOS | Components: DatePickerIOS
8.组件:DrawerLayoutAndroid | Components: DrawerLayoutAndroid
9.组件:FlatList | Components: FlatList
10.组件:图像 | Components: Image
11.组件:KeyboardAvoidingView | Components: KeyboardAvoidingView
12.Components: ListView
13.Components: MaskedViewIOS
14.Components: Modal
15.Components: NavigatorIOS
16.Components: Picker
17.Components: PickerIOS
18.Components: ProgressBarAndroid
19.Components: ProgressViewIOS
20.Components: RefreshControl
21.Components: ScrollView
22.Components: SectionList
23.Components: SegmentedControlIOS
24.Components: Slider
25.Components: SnapshotViewIOS
26.Components: StatusBar
27.Components: Switch
28.Components: TabBarIOS
29.Components: TabBarIOS.Item
30.Components: Text
31.Components: TextInput
32.Components: ToolbarAndroid
33.Components: TouchableHighlight
34.Components: TouchableNativeFeedback
35.Components: TouchableOpacity
36.Components: TouchableWithoutFeedback
37.Components: View
38.Components: ViewPagerAndroid
39.Components: VirtualizedList
40.Components: WebView
41.创建 | Contributing
42.指南(Android) | Guides (Android)
43.指南(IOS) | Guides (iOS)
44.其他 | Miscellaneous