Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I use pull-to-refresh functionality in a PhoneGap application without iScroll?

I have a PhoneGap project set up for iPhone, Android and WP8.

To refresh the content of the UIWebView I'd like to offer pull-to-refresh functionality to the user.

Due to other restrictions I can't use a JavaScript-solution like iScroll.

Is there a way to use native pull-to-refresh functionality that reloads the current content of UIWebView?

like image 507
Timo Ernst Avatar asked Jan 08 '13 14:01

Timo Ernst


1 Answers

After weeks of research I found out that there is no solution that works for all my needs. So far it seems like I needed a custom solution for each operating system. This is what I came up with:

  • iOS version < 5: iScroll
  • iOS version 5+: http://damien.antipa.at/2012/10/16/ios-pull-to-refresh-in-mobile-safari-with-native-scrolling
  • Android: iScroll
  • WP8: Needs an own custom solution

Also it should be noted that WP8 users are not used to "pull to refresh" since it is not a common behaviour on WP. Therefore implementing pull-to-refresh for WP8 should be well thought through.

like image 113
Timo Ernst Avatar answered Nov 09 '22 06:11

Timo Ernst