Repository: incubator-weex Updated Branches: refs/heads/master a6c3ff575 -> 48490acfb
[WEEX-109][iOS] bugfix with scrollstart and scrollend event's interface for scroller close #913 * [doc] bugfix about transition's new supportted version' * [doc] bugfix about scrollstart and scrollend * [doc] fix typo about scroller Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/48490acf Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/48490acf Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/48490acf Branch: refs/heads/master Commit: 48490acfb2db53207c32daf805918f726718c182 Parents: a6c3ff5 Author: doumafang <doumaf...@gmail.com> Authored: Mon Nov 27 20:00:30 2017 +0800 Committer: acton393 <zhangxing610...@gmail.com> Committed: Thu Nov 30 20:12:18 2017 +0800 ---------------------------------------------------------------------- doc/source/cn/references/common-style.md | 2 +- doc/source/cn/references/components/scroller.md | 4 +++ doc/source/references/common-style.md | 2 +- doc/source/references/components/scroller.md | 26 +++++++++++++------- .../Sources/Component/WXScrollerComponent.m | 1 + 5 files changed, 24 insertions(+), 11 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/48490acf/doc/source/cn/references/common-style.md ---------------------------------------------------------------------- diff --git a/doc/source/cn/references/common-style.md b/doc/source/cn/references/common-style.md index 937e8de..3af25bc 100644 --- a/doc/source/cn/references/common-style.md +++ b/doc/source/cn/references/common-style.md @@ -344,7 +344,7 @@ transform 屿§åå ç´ åºç¨ 2D 转æ¢ãè¯¥å±æ§å 许æä»¬å¯¹å ç´ è¿è¡ -## transition <span class="api-version">v0.16.0+</span> +## transition <span class="api-version">v0.17.0+</span> ç°å¨æ¨å¯ä»¥å¨CSSä¸ä½¿ç¨transition屿§æ¥æåæ¨åºç¨çäº¤äºæ§ä¸è§è§æåï¼transitionä¸å æ¬å¸å±å¨ç»ï¼å³LayoutAnimationï¼ç°å¨å¸å±äº§çååçåæ¶ä¹è½ä½¿ç¨transition带æ¥çæµç å¨ç»ãtransitionå 许CSSç屿§å¼å¨ä¸å®çæ¶é´åºé´å å¹³æ»å°è¿æ¸¡ã http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/48490acf/doc/source/cn/references/components/scroller.md ---------------------------------------------------------------------- diff --git a/doc/source/cn/references/components/scroller.md b/doc/source/cn/references/components/scroller.md index acac227..69c7d5d 100644 --- a/doc/source/cn/references/components/scroller.md +++ b/doc/source/cn/references/components/scroller.md @@ -72,6 +72,10 @@ version: 2.1 - `x {number}`: xè½´ä¸çåç§»é - `y {number}`: yè½´ä¸çåç§»é +- `scrollstart` <sup class="wx-v">v0.17+</sup>ï¼å表åå¼å§åçæ»å¨çæ¶åä¼è§¦å该äºä»¶ï¼å¯ä»¥å¨æ¤æ§è¡æ»å¨å¼å§çé»è¾ã + +- `scrollend` <sup class="wx-v">v0.17+</sup>ï¼åè¡¨ç»ææ»å¨çæ¶åä¼è§¦å该äºä»¶ï¼å¯ä»¥å¨æ¤æ§è¡æ»å¨ç»æçé»è¾ã + - éç¨äºä»¶ æ¯æææéç¨äºä»¶ï¼ http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/48490acf/doc/source/references/common-style.md ---------------------------------------------------------------------- diff --git a/doc/source/references/common-style.md b/doc/source/references/common-style.md index 359b0e0..97e5e8c 100644 --- a/doc/source/references/common-style.md +++ b/doc/source/references/common-style.md @@ -231,7 +231,7 @@ Currently supported format: </style> ``` -## transition <span class="api-version">v0.16.0+</span> +## transition <span class="api-version">v0.17.0+</span> Now you can use the transition attribute in CSS to enhance the interactivity and visual experience of your application. The transition includes the layout animation, that is, LayoutAnimation, which now changes the layout and uses the fluent animation of the transition. Transition allows the CSS attribute values to transition smoothly over a certain time interval. http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/48490acf/doc/source/references/components/scroller.md ---------------------------------------------------------------------- diff --git a/doc/source/references/components/scroller.md b/doc/source/references/components/scroller.md index 4218757..5df849c 100644 --- a/doc/source/references/components/scroller.md +++ b/doc/source/references/components/scroller.md @@ -48,15 +48,23 @@ common styles: check out [common styles for components](../common-style.html) ## Events -`loadmore` used with loadmoreoffset attribute. if the view has less than loadmoreoffset to scroll down, the onloadmore event will be triggered. - -`scroll` <sup class="wx-v">0.12+</sup> used with offset-accuracy attribute. This event is fired when the list scrolls. The current contentOffset value is given in this event callback. See details in [scroll event demo](http://dotwe.org/vue/9ef0e52bacaa20182a693f2187d851aa). - -common events: check out the [common events](../common-event.html) - -* support onclick event. Check out [common events](../common-event.html) -* support onappear / ondisappear event. Check out [common events](../common-event.html) - +- `loadmore` used with loadmoreoffset attribute. if the view has less than loadmoreoffset to scroll down, the onloadmore event will be triggered. +- `scroll` <sup class="wx-v">0.12+</sup> used with offset-accuracy attribute. This event is fired when the list scrolls. The current contentOffset value is given in this event callback. See details in [scroll event demo](http://dotwe.org/vue/9ef0e52bacaa20182a693f2187d851aa). + - `contentSize {Object}`ï¼The content size of the list + - `width {number}`: List content width + - `height {number}`: List content height + - `contentOffset {Object}`: Offset size of the list + - `x {number}`: Offset on x-axis + - `y {number}`: Offset on y-axis +- `scrollstart` <sup class="wx-v">v0.17+</sup>ï¼This event is triggered when the list starts to scroll, where you can start the logic of the start of the scrolling. +- `scrollend` <sup class="wx-v">v0.17+</sup>ï¼This event is triggered when the list has finished scrolling, where you can execute the logic that the scroll ends. +- common events: check out the [common events](../common-event.html) + - `click` + - `longpress` + - `appear` + - `disappear` + +## event.html) ## Restrictions http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/48490acf/ios/sdk/WeexSDK/Sources/Component/WXScrollerComponent.m ---------------------------------------------------------------------- diff --git a/ios/sdk/WeexSDK/Sources/Component/WXScrollerComponent.m b/ios/sdk/WeexSDK/Sources/Component/WXScrollerComponent.m index a2c3b71..13928b8 100644 --- a/ios/sdk/WeexSDK/Sources/Component/WXScrollerComponent.m +++ b/ios/sdk/WeexSDK/Sources/Component/WXScrollerComponent.m @@ -634,6 +634,7 @@ WX_EXPORT_METHOD(@selector(resetLoadmore)) } if (!decelerate) { _isScrolling = NO; + [self performSelector:@selector(scrollViewDidEndDecelerating:) withObject:nil afterDelay:0.1]; } }