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

iOS7: TableViewRow: leftImage property renders improper image alignment

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Medium
    • Resolution: Invalid
    • Affects Version/s: Release 3.2.2
    • Fix Version/s: None
    • Component/s: iOS
    • Environment:

      Description

      iOS7: TableViewRow: leftImage property renders improper image allignment.
      It works fine on iOS 6 device(iPOD touch iOS:6.1.3). Issue also occurs on 3.2.1.GA,3.2.0.GA sdk

      Steps to reproduce:
      1. Run the below app.

      var win = Ti.UI.createWindow({
      	backgroundColor: 'red'
      });
      createTableRow = function(args){
      		  // save the title for our own use
      		  var title = args.title;
      		  args.title = '';
      		  args.left = 42;
      		  args.height = 40;
      		 
      		  var row = Ti.UI.createTableViewRow(args);
      		 
      		  var label = Ti.UI.createLabel({
      		    backgroundColor: 'pink',
      		    text: title,
      		    textAlign: Ti.UI.TEXT_ALIGNMENT_LEFT,
      		    width: Ti.UI.FILL,
      		    height: args.height - 5,
      		    left: args.left,
      		    font: { fontSize: 17, fontWeight: 'bold'},
      		  });
      		 
      		  row.add(label);
      		 
      		  row.label_title = title;
      		 
      		  return row;
      		};
      		 
      		var rows = [];
      		rows.push( createTableRow({ title: 'table', leftImage: '/KS_nav_ui.png'}) );
      		rows.push( createTableRow({ title: 'row', leftImage: '/KS_nav_ui.png'}) );
      		rows.push( createTableRow({ title: 'rock' }) );
      		rows.push( createTableRow({ title: 'car', leftImage: '/KS_nav_ui.png'}) );
      		rows.push( createTableRow({ title: 'tab' }) );
      		rows.push( createTableRow({ title: 'row boat', leftImage: '/KS_nav_ui.png'}) );
      		rows.push( createTableRow({ title: 'table row', leftImage: '/KS_nav_ui.png'}) );
      		rows.push( createTableRow({ title: 'test', leftImage: '/KS_nav_ui.png'}) );
      		rows.push( createTableRow({ title: 'apple' }) );
      		 
      		var search = Ti.UI.createSearchBar({
      		  showCancel: false
      		});
      		 
      		var table = Ti.UI.createTableView({
      		  data: rows,
      		  search: search,
      		  searchHidden: false,
      		  filterAttribute: 'label_title',
      		  filterCaseInsensitive: true
      		});
      		 
      		win.add(table);
      		 
      		win.open();
      
      

      Expected:
      left image in tableviewrow should be properly alligned.

      Actual:
      left image overlaps with the label. Screenshots are attached for iOS7 and iOS:6 devices.

        Attachments

          Activity

            People

            • Assignee:
              srahim Sabil Rahim
              Reporter:
              pmishra Paras Mishra
            • Watchers:
              0 Start watching this issue

              Dates

              • Due:
                Created:
                Updated:
                Resolved:

                Backbone Issue Sync

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

                  Git Source Code