[TIMOB-23524] iOS10: Support RefreshControl in Ti.UI.ScrollView
| GitHub Issue | n/a |
|---|---|
| Type | New Feature |
| Priority | High |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2016-06-14T22:36:58.000+0000 |
| Affected Version/s | n/a |
| Fix Version/s | Release 5.5.0 |
| Components | iOS |
| Labels | ios10, qe-5.5.0 |
| Reporter | Hans Knöchel |
| Assignee | Hans Knöchel |
| Created | 2016-06-14T21:24:02.000+0000 |
| Updated | 2017-08-27T16:51:59.000+0000 |
Description
iOS 10 supports the RefreshControl in the
Ti.UI.ScrollView, we should add it the same way we currently do with our ListViews and TableViews.
PR: https://github.com/appcelerator/titanium_mobile/pull/8067 Demo:
var win = Ti.UI.createWindow({ backgroundColor: "#fff" }); var refreshControl = Ti.UI.createRefreshControl({ tintColor: "red" }); var scroll = Ti.UI.createScrollView({ backgroundColor: "yellow", refreshControl: refreshControl }); refreshControl.addEventListener("refreshstart", function() { setTimeout(function() { refreshControl.endRefreshing(); },1000); }) scroll.add(Ti.UI.createLabel({ text: "Scroll down!" })); win.add(scroll); win.open();PR (5_5_X): https://github.com/appcelerator/titanium_mobile/pull/8220
Verified as fixed, RefreshControl in Ti.UI.ScrollView is now supported for iOS10. An appropriate warning is returned on devices < iOS10:
Tested On: iPhone 6S (10.0, 9.3.4) Device & Simulator Mac OSX El Capitan 10.11.6 Ti SDK: 5.5.0.v20160816120242 Appc Studio: 4.7.0.201607250649 Appc NPM: 4.2.7 App CLI: 6.0.0-25 Xcode 8.0 beta 6 (8S193k) Node v4.4.7 *Closing ticket.*Created ALOY-1519 to add support for the
<RefreshControl>tag in Alloy /cc [~fmiao] :-)