{ "id": "91702", "key": "TIMOB-9093", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "13271", "description": "Release 2.1.0", "name": "Release 2.1.0", "archived": false, "released": true, "releaseDate": "2012-06-29" }, { "id": "13407", "description": "Sprint 2012-11 API", "name": "Sprint 2012-11 API", "archived": true, "released": true, "releaseDate": "2012-06-03" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-07-10T23:26:50.000+0000", "created": "2012-05-10T09:24:52.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "SupportTeam", "api", "module_navgroup", "qe-testadded" ], "versions": [ { "id": "13070", "description": "Release 1.8 Service Pack 2", "name": "Release 1.8.2", "archived": true, "released": true, "releaseDate": "2012-02-29" } ], "issuelinks": [], "assignee": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2012-07-11T15:10:53.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "h3. Problem\r\n\r\nWhen a button is created without the backgroundImage property set, and added to the navbar using setRightNavButton method the code works. However, when backgroundImage is set on the button, the button isn't displayed.\r\n\r\nh4. Steps to Reproduce\r\n\r\nRun the below sample code and provide any image in the backgroundImage property to see the issue.\r\n\r\nh3. Sample Code\r\n\r\n{noformat}\r\n\r\n//create module instance\r\nvar self = Ti.UI.createTabGroup();\r\n\r\n\r\nvar win1 = Ti.UI.createWindow({\r\n title : 'Hello World',\r\n backgroundColor : 'white'\r\n}); \r\n\r\nvar navBarRightButton = Ti.UI.createButton({title: 'Test Button', backgroundImage:'buttonBackground.png'});\r\n\r\nvar button = Ti.UI.createButton({\r\n height : 44,\r\n width : 200,\r\n title : 'openWindow',\r\n top : 20\r\n});\r\nwin1.add(button);\r\n\r\nwin1.setRightNavButton(navBarRightButton);\r\n\r\nvar tab1 = Ti.UI.createTab({\r\n title : 'home',\r\n icon : '/images/KS_nav_ui.png',\r\n window : win1\r\n});\r\n\r\n\r\nvar win2 = Ti.UI.createWindow({\r\n title : 'Hello World',\r\n backgroundColor : 'white'\r\n}); \r\n\r\nvar tab2 = Ti.UI.createTab({\r\n title : 'settings',\r\n icon : '/images/KS_nav_views.png',\r\n window : win2\r\n});\r\n\r\n\r\n\r\n\r\nself.addTab(tab1);\r\nself.addTab(tab2); \r\n\r\nself.open();\r\n\r\n\r\n{noformat}\r\n\r\n", "attachment": [], "flagged": false, "summary": "iOS: Setting backgroundImage on a custom navBar button does not show up the button ", "creator": { "name": "vjoshi", "key": "vjoshi", "displayName": "Varun Joshi", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "vjoshi", "key": "vjoshi", "displayName": "Varun Joshi", "active": true, "timeZone": "America/New_York" }, "environment": "Titanium SDK: 1.8.2\r\nPlatform OS: iOS VER 4.3+", "comment": { "comments": [ { "id": "195094", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "This ticket will be scheduled in next sprint. For now you can use the following JS workaround\r\n{code}\r\nvar wrapper = Ti.UI.createView();\r\nvar navBarRightButton = Ti.UI.createButton({title: 'Test Button', backgroundImage:'buttonBackground.png'});\r\nwrapper.add(navBarRightButton);\r\nwin1.setRightNavButton(wrapper);\r\n{code}", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-05-16T15:36:19.000+0000", "updated": "2012-05-16T15:36:19.000+0000" }, { "id": "199025", "author": { "name": "mpettiford", "key": "mpettiford", "displayName": "Michael Pettiford", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Closing issue\r\n\r\nTested with Ti Studio build 2.1.0.201206172244\r\nTi Mobile SDK2.1.0.v20120618134156 hash r00905cd0\r\nOSX Lion 10.7.3\r\niPhone 4S OS 5.1\r\n\r\nThe expected behavior is shown", "updateAuthor": { "name": "mpettiford", "key": "mpettiford", "displayName": "Michael Pettiford", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-06-18T17:59:37.000+0000", "updated": "2012-06-18T17:59:37.000+0000" }, { "id": "201895", "author": { "name": "rogmabi", "key": "rogmabi", "displayName": "Roger Mabillard", "active": true, "timeZone": "America/Montreal" }, "body": "Updating the background image in the code does still not update the background image of a custom navbar button. Example:\r\n\r\n// we have set the backgroundImage at the creation, now we call this function to update it:\r\n\r\nfunction showStatePicker() {\r\n state_label.focus();\r\n state_label.enabled = false;\r\n backNavButton.title = L('Select');\r\n backNavButton.backgroundImage = '/imgs/navbar/navbar.png';\r\n backNavButton.removeEventListener('click', closeAnimation);\r\n backNavButton.addEventListener('click', hideStatePicker);\r\n self.setRightNavButton(backNavButton);\r\n self.add(states_picker);\r\n if (!state_label.value) {\r\n state_label.value = states_picker_data[0].title;\r\n }\r\n}", "updateAuthor": { "name": "rogmabi", "key": "rogmabi", "displayName": "Roger Mabillard", "active": true, "timeZone": "America/Montreal" }, "created": "2012-07-06T14:37:13.000+0000", "updated": "2012-07-06T14:37:13.000+0000" }, { "id": "202521", "author": { "name": "nchhabra", "key": "nchhabra", "displayName": "Neha Chhabra", "active": true, "timeZone": "Asia/Kolkata" }, "body": "Reopening to update labels.", "updateAuthor": { "name": "nchhabra", "key": "nchhabra", "displayName": "Neha Chhabra", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2012-07-10T23:26:18.000+0000", "updated": "2012-07-10T23:26:18.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }