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

iOS 7 Issue with TableView and autoAdjustScrollViewInsets

    Details

      Description

      I am running into the following problem when I create a NavigationWindow and a TableView. The TableView is hidden beneath the navbar. This is an issue that is present throughout my entire application. See first attached image for this issue.

      Here is an example case where in my app.js file, I am doing a simple user authentication. Depending on the outcome of that, determines which screen my user is navigated to. For this example, the user is directed to the login screen. Here is a snippet of code from that.

      app.js

      var nav = Ti.UI.iOS.createNavigationWindow();
      var viewInc = require('login');
      var viewWin = new viewInc.LoginUser(nav);
       
      nav.window = viewWin;
      viewWin.autoAdjustScrollViewInsets = true;
       
      nav.open();
      

      You can see that I am adjusting the scroll view insets before the window gets opened as stated in the docs. Now in my login.js file, I have the window and table view objects. Here are the properties associated with those.

      login.js – window

      mainWin = Ti.UI.createWindow({
          backgroundColor:'#ededed',
          width:'auto',
          height:'auto',
          title:'Welcome',
          leftNavButton: Ti.UI.createButton({
              title: 'Register',
              color:'#fff',
              font:{
                  fontSize:17,
                  fontFamily:"Helvetica Neue"
              }
          }),
          rightNavButton: Ti.UI.createButton({
              title: 'Sign In',
              color:'#fff',
              font:{
                  fontSize:17,
                  fontFamily:"Helvetica Neue"
              },
              enabled:false
          }),
          navTintColor:'#fff',
          barColor:'#1179a0',
          extendEdges:[Ti.UI.EXTEND_EDGE_TOP],
          includeOpaqueBars:false
      });
      

      login.js – tableView

      table = Ti.UI.createTableView({
          width:320,
          separatorColor:'#ddd',
          style:Ti.UI.iPhone.TableViewStyle.GROUPED,
          backgroundColor:'transparent',
          editable:false,
          footerView:forgot
      });
      

      This is definitely a bug that needs to be resolved quickly. I don't want to just simply move my table down because I want to have that nice blurred effect beneath the navbar as you are scrolling.

      Now what I've noticed is that if you don't add any custom objects to the table rows, the issue is no longer present. In my application, I've added the two TextFields to the table rows. If I remove them and just have two empty table rows, I get the following... See second attachment.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                mkinbaum Matthew Kinbaum
              • Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Backbone Issue Sync

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

                    Git Source Code