Titanium JIRA Archive
Appcelerator Community (AC)

[AC-2781] iOS: Tableview empty and freezing sometimes after clicking back button of navigaton bar

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionCannot Reproduce
Resolution Date2012-08-21T09:41:03.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsTitanium SDK & CLI
Labelsios, tableview
ReporterYue Ming Wang
AssigneeShak Hossain
Created2012-07-20T23:25:55.000+0000
Updated2016-03-08T07:47:41.000+0000

Description

It is a tab-based ios app. The tab is hidden by hideTabBar(). 1. In the home view, enter into the second level view via Ti.UI.currentTab.open(win, {animated:true}); 2. The second level view contains a Tableview. 3. Click one row of Tableview, enter the third level view via Ti.UI.currentTab.open(win, {animated:true}); 4. Click the back button of navigaton bar of the third level view, return back to the second level view. 5. Sometimes, the Tableview displays empty rows and freezing, the scroll-down refresh function is also not working. 6. Return back to the home view and reenter into the second level view, the Tableview recovers.

Attachments

FileDateSize
code.zip2012-08-07T00:58:27.000+000051477
IMG_1874.PNG2012-07-20T23:25:55.000+000019041

Comments

  1. Nikhil Sharma 2012-08-02

    Hi, Could you please provide a reproducible test case?
  2. Yue Ming Wang 2012-08-03

    http://itunes.apple.com/cn/app/koob/id524045972?l=en&mt=8 You can download this app and have a try.
  3. Nikhil Sharma 2012-08-06

    Hi, Please narrow down the issue and provide a reproducible sample test case. Provide a code snippet.
  4. Yue Ming Wang 2012-08-07

    This issue occurs sometime, not every time. I enclose some js files for your reference.
  5. Yue Ming Wang 2012-08-07

    some source code for your reference.
  6. Nikhil Sharma 2012-08-12

    Hi, I can't run the application with the code provided by you. I can't reproduce it. Please provide a reproducible test case.
  7. Nikhil Sharma 2012-08-21

    Cannot reproduce the issue.
  8. Mostafizur Rahman 2014-01-02

    Hello, I tested this this issue with the code below. I can’t reproduce this issue. Please check this code with the latest Ti SDK Build and let me know if this problem persists. If you are able to reproduce, please post your test case with the details. We will revisit this issue then.

    Test Environment

    Mac OS X 10.8.5 Ti SDK 3.2.0.GA Ti CLI 3.2.0 IOS 7.0.3

    Test Code

       var tabGroupMain = Titanium.UI.createTabGroup();
        
       //
       // create base UI tab and root window
       //
        
       var winMain = Titanium.UI.createWindow({
           backgroundColor: 'orange',
           title: 'Red Window'
       });
        
       var win1 = Titanium.UI.iOS.createNavigationWindow({
          window: winMain,
           title: 'Tab 1',
           backgroundColor: 'orange',
           layout: 'vertical'
           
       });
        
       var tabFirst = Titanium.UI.createTab({
           icon: 'KS_nav_views.png',
           title: 'Tab 1',
           window: win1
       });
        
        
       // Create a TableView.
       var aTableView = Ti.UI.createTableView();
        
       // Populate the TableView data.
       var data = [
       	{title:'Row 1', hasChild:true, color:'red', header:'First'},
       	{title:'Row 2', hasDetail:true, color:'green'},
       	{title:'Row 3', hasCheck:true, color:'blue', header:'Second'},
       	{title:'Row 4', color:'orange'}
       ];
       aTableView.setData(data);
        
       // Listen for click events.
        
       win1.add(aTableView);
        
        
       var close = Titanium.UI.createButton({
           color: 'black',
           title: 'Back',
           width: 180,
           height: 35,
           bottom:10
       });
        
       win1.add(close);
        
       close.addEventListener('click', function(){
            tabGroup.close();
            
            
         
       });
        
       aTableView.addEventListener('click',
       function(e) {
        
           var tabWin = Titanium.UI.createWindow({
               title: 'Modal Window',
               backgroundColor: '#f0f',
               width: '100%',
               height: '100%',
               tabBarHidden: true
           });
           
              var tBtn = Titanium.UI.createLabel({
               text: 'Hello World',
               width: 180,
               height: 35
           });
           tabWin.add(tBtn);
        
           var tabGroup = Titanium.UI.createTabGroup({
               bottom: -500,
               width: '100%',
               height: '100%'
           });
           var tab1 = Titanium.UI.createTab({
               icon: 'KS_nav_views.png',
               width: '100%',
               height: '100%',
               title: 'tabWin',
               window: tabWin
           });
           tabGroup.addTab(tab1);
           tabGroup.open();
        
           var closeBtn = Titanium.UI.createButton({
               title: 'Back'
           });
           tabWin.leftNavButton = closeBtn;
           closeBtn.addEventListener('click',
           function(e) {
               tabGroup.animate({
                   duration: 400,
                   bottom: -500
               },
               function() {
                   tabGroup.close();
               });
           });
        
        
        
        
         
        
        
           tabGroup.animate({
               duration: 400,
               bottom: 0
           });
       });
        
        
        
        
        
       //
       //  add tabs
       //
       tabGroupMain.addTab(tabFirst);
        
        
        
       // open tab group
       tabGroupMain.open();
       
    Thanks

JSON Source