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

iOS: separatorInsets should not be used for header/section titles

    Details

    • Story Points:
      3
    • Sprint:
      2015 Sprint 24 SDK

      Description

      The new separatorInsets can only be set for the full TableView or ListView. Unfortunately, they affect not only the separator lines, but also the section headerTitle and footerTitle while at the same time the TableView and ListView direct headerTitle and footerTitle are *not* affected.

      I would suggest changing the behavior for the section headerTitle and sectionTitle to be not affected as well. You can always use a custom header and footer view and the main reason for seperatorInsets is to disable/customize the inset of the separator line in iOS7 and up.

      To reproduce

      Run both of this app.js both with and without the separatorInsets property and compare the screenshots attached:

      var win = Ti.UI.createWindow({
      	backgroundColor: '#fff'
      });
       
      var sectionFruit = Ti.UI.createTableViewSection({ headerTitle: 'Fruit headerTitle', footerTitle: 'Fruit footerTitle' });
      sectionFruit.add(Ti.UI.createTableViewRow({ title: 'Apples' }));
      sectionFruit.add(Ti.UI.createTableViewRow({ title: 'Bananas' }));
       
      var sectionVeg = Ti.UI.createTableViewSection({ headerTitle: 'Vegetables headerTitle', footerTitle: 'Vegetables footerTitle' });
      sectionVeg.add(Ti.UI.createTableViewRow({ title: 'Carrots' }));
      sectionVeg.add(Ti.UI.createTableViewRow({ title: 'Potatoes' }));
       
      var table = Ti.UI.createTableView({
      	top: 20,
      	style: Ti.UI.iPhone.TableViewStyle.GROUPED,
      	headerTitle: 'Table headerTitle',
      	footerTitle: 'Table footerTitle',
       
              // On second run remove this property
      	separatorInsets: {
      		left: 0, right: 0
      	},
       
      	data: [sectionFruit, sectionVeg]
      });
       
      win.add(table);
      win.open();
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                apetkov Angel Petkov
                Reporter:
                fokkezb Fokke Zandbergen
                Reviewer:
                Hans Knöchel
              • Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

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

                    Git Source Code