Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-7437] iOS: Bounce in TableView when its parent view has a vertical height set to a float value

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionCannot Reproduce
Resolution Date2013-04-04T11:41:18.000+0000
Affected Version/sRelease 1.8.0.1, Release 2.0.0
Fix Version/sRelease 3.0.2
ComponentsiOS
Labelsn/a
ReporterEduardo Gomez
AssigneeShameer Jan
Created2012-01-26T17:26:17.000+0000
Updated2017-03-16T18:44:21.000+0000

Description

Issue

When the vertical height (of one of the parent views) is a float value instead of an integer value (as a result of a math calculation) TableView it bounces after scrolling to bottom of table view. For example, when the vertical height is set to 470 or 471, it does not bounce. If it is set to 470.5, then it bounces.

Tested on

iOS 4.3 iPhone iOS 5 simulator

Steps to reproduce

1) Run code below *** difficult to reproduce though. 2) Scroll to bottom of tableView in view1 - it doesn't bounce 3) Scroll right to second view 4) Scroll to bottom of tableView in view2 - it bounces

Repro sequence

// this sets the background color of the master UIView (when there are no windows/tab groups on it)
Titanium.UI.setBackgroundColor('#000');

////
var win1 = Titanium.UI.createWindow({  
    title:'Tab 1',
    backgroundColor:'#fff'
});
var tab1 = Titanium.UI.createTab({  
    icon:'KS_nav_views.png',
    title:'Tab 1',
    window:win1
});

var rows = [];

for(var i = 0; i <= 50; i++) {
	rows.push(Ti.UI.createTableViewRow({
		title : "Row " + i,
	}));
}

var tableView1 = Ti.UI.createTableView({
	data: rows
});
var view1 = Ti.UI.createView({
	backgroundColor:'red',
	height:470//it doesn't bounce
});
view1.add(tableView1);

var tableView2 = Ti.UI.createTableView({
	data: rows
});
var view2 = Ti.UI.createView({
	backgroundColor:'blue',
	height:470.5//it bounces
});
view2.add(tableView2);

var scrollableView = Ti.UI.createScrollableView({
	views:[view1, view2],
	showPagingControl: true,
	disableBounce: true
});

win1.add(scrollableView);

win1.open();

Comments

  1. Shameer Jan 2013-04-04

    Issue does not reproduces Tested with Titanium Studio, build: 3.0.1.201212181159 Titanium SDK version: 3.1.0 Titanium SDK version: 3.0.2 iOS iPhone Simulator: iOS SDK version: 5
  2. Lee Morris 2017-03-16

    Closing ticket as the issue cannot be reproduced.

JSON Source