Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-16218

iOS: Ti.UI.RefreshControl.beginRefreshing() does not work

    Details

    • Type: Bug
    • Status: Closed
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: Release 3.2.0
    • Fix Version/s: Release 6.0.0
    • Component/s: iOS
    • Environment:

      Ti.SDK 3.2.0
      iOS 7.0.3

    • Story Points:
      5
    • Sprint:
      2016 Sprint 14 SDK

      Description

      Test Code

      var win = Ti.UI.createWindow();
      var counter = 0;
      function genData() {
          var data = [];
          var i = 1;
          for ( i = 1; i <= 3; i++) {
              data.push({
                  properties : {
                      title : 'ROW ' + (counter + i)
                  }
              });
          }
          counter += 3;
          return data;
      }
       
      var section = Ti.UI.createListSection();
      section.setItems(genData());
      var control = Ti.UI.createRefreshControl({
          tintColor : 'red'
      });
       
       
      var listView = Ti.UI.createListView({
          sections : [section],
          refreshControl : control
      });
       
      control.addEventListener('refreshstart', function(e) {
          Ti.API.info('refreshstart');
          setTimeout(function() {
              Ti.API.debug('Timeout');
              section.appendItems(genData());
              control.endRefreshing();
          }, 2000);
      });
       
      win.add(listView);
      win.open();
       
      control.beginRefreshing(); //It does not do anything when being called
      

      Actual Result

      Nothing happens

      Expected Result

      RefreshControl should show its loading state in other words show the spinning wheel at the top

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                hknoechel Hans Knöchel
                Reporter:
                jialhe85@gmail.com David He
                Reviewer:
                Angel Petkov
                Tester:
                Harry Bryant
              • Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

                  • Titanium SDK/CLI <> Titanium Mobile
                    Synced with:
                    TIMOB-18215
                    Sync status:
                    ERROR
                    Last received:
                    Last sent:

                    Git Source Code