Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-18143] iOS: Cannot set searchbar background image

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2015-05-12T04:46:25.000+0000
Affected Version/sRelease 3.5.0
Fix Version/sRelease 4.1.0
ComponentsiOS
Labelsbackgroundimage, ios, qe-3.5.0, qe-4.0.0, searchbar
ReporterEric Wieber
AssigneePedro Enrique
Created2014-12-05T23:56:16.000+0000
Updated2015-07-07T22:16:44.000+0000

Description

No change is witnessed when attempting to change a searchbar's background image *Steps to reproduce issue*: 1. Launch the sample code below 2. Click on "Click to set image" 3. Notice that the background of the searchbar is not changed *Expected Results*: The serchbar background is changed *Notes*: I see the same behavior with 3.4.1.GA and 3.5.0 GA
var win = Ti.UI.createWindow({
	title : 'searchbar with backgroundImage',
	backgroundColor : '#fff'
});
var searchbar = Ti.UI.createSearchBar({
	top : 0,
	showCancel : true,
	backgroundImage : 'KS_nav_ui.png',
	prompt : 'prompt text',
	height : 100,
	hintText : "This is the hint text",
});
var btn = Ti.UI.createButton({
	top : 200,
	left : 10,
	title : 'click to set image',
	height : 100,
});
btn.addEventListener('click', function() {
	searchbar.backgroundImage = 'KS_nav_views.png';
});
win.add(searchbar);
win.add(btn);
win.open();

Comments

  1. Pedro Enrique 2015-03-27

    PR: https://github.com/appcelerator/titanium_mobile/pull/6752
  2. Chee Kiat Ng 2015-05-12

    CR and FT passed. PR Merged.
  3. Eric Wieber 2015-07-07

    Verified fixed, using: MacOS 10.11 Studio 4.1.0.201507061821 Ti SDK 4.1.0.v20150706111546 Appc NPM 4.1.0-1 Appc CLI 4.1.0-5 Ti CLI 4.0.1 Alloy 1.6.2 Node v0.10.37 Java 1.7.0_45 preproduction Searchbar background image is changed.

JSON Source