Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-7120] iOS: ButtonBar, TabbedBar don't accept Blob images

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionCannot Reproduce
Resolution Date2013-04-19T09:11:24.000+0000
Affected Version/sn/a
Fix Version/sRelease 3.0.2
ComponentsiOS
Labelsapi, parity
ReporterArthur Evans
Assigneejithinpv
Created2012-01-11T22:32:15.000+0000
Updated2017-03-17T18:35:43.000+0000

Description

According to the button bar doc, you can use either a path or a Blob to specify an image for a button bar (and presumably tabbed bar) button. However, this doesn't seem to work. Given the following code: {code> var imgFile = Titanium.Filesystem.getFile('KS_nav_views.png'); if (! imgFile.exists() ) { alert("Couldn't open image file.")} else { Ti.API.info("imgFile is: " + imgFile); } var imgBlob = imgFile.read(); Ti.API.info("image blog size is: " + imgBlob.height + "x" + imgBlob.width); bb2 = Ti.UI.iOS.createTabbedBar({ labels : [ { title: "One", image: "KS_nav_ui.png" }, { image: imgBlob }], backgroundColor : 'green', style : Ti.UI.iPhone.SystemButtonStyle.PLAIN, bottom : 100, height : 60 }); ``` I would expect to see images on both buttons, but only the first one appears. From the log statements, it appears that the blob is OK, but no image shows up on the second button.

Comments

  1. jithinpv 2013-04-19

    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: 6.0
  2. jithinpv 2013-04-19

    use this code: var win = Ti.UI.createWindow({ backgroundColor: 'white', exitOnClose: true, fullscreen: false, layout: 'vertical', title: 'Label Demo' }); var imgFile = Titanium.Filesystem.getFile('KS_nav_views.png'); if (! imgFile.exists() ) { alert("Couldn't open image file.")} else { Ti.API.info("imgFile is: " + imgFile); } var imgBlob = imgFile.read(); Ti.API.info("image blog size is: " + imgBlob.height + "x" + imgBlob.width); bb2 = Ti.UI.iOS.createTabbedBar({ labels : [ { title: "One", image: "KS_nav_ui.png" }, { image: imgBlob }], backgroundColor : 'green', style : Ti.UI.iPhone.SystemButtonStyle.PLAIN, bottom : 100, height : 60 }); win.add(bb2); win.open();
  3. Lee Morris 2017-03-17

    Closing ticket as the issue cannot be reproduced.

JSON Source