{ "id": "117195", "key": "TIMOB-14564", "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": [], "resolution": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2017-05-02T22:06:08.000+0000", "created": "2013-07-15T18:56:04.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "button", "navbar", "navbutton", "navigation", "window" ], "versions": [], "issuelinks": [], "assignee": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-06-15T18:54:12.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": [], "description": "There are few functions for hide NavBarButton ,but any one doesn't work.\r\n\r\n{code:javascript}\r\nvar button = Ti.UI.createButton({\r\n\tsystemButton: Ti.UI.iPhone.SystemButton.TRASH\r\n});\r\n\r\nvar win = Titanium.UI.createWindow({\r\n\ttitle: \"Just window\",\r\n rightNavButton: button\r\n});\r\n \r\nvar navGroup = Ti.UI.iPhone.createNavigationGroup({\r\n window: win\r\n});\r\n \r\nvar mainWin = Ti.UI.createWindow();\r\nmainWin.add(navGroup);\r\nmainWin.open();\r\n\r\n// === === ===\r\nbutton.hide();\r\nbutton.visible = false;\r\nwin.rightNavButton.visible = false;\r\nwin.rightNavButton.hide();\r\n{code}", "attachment": [], "flagged": false, "summary": "iOS: Hiding rightNavButton using properties or methods doesn't work", "creator": { "name": "sko", "key": "sko", "displayName": "Matej", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "sko", "key": "sko", "displayName": "Matej", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Macbook Pro, OSX 10.7.5, iOS Simulator v. 6.0 (369.2). Ti: 3.1.1 GA", "comment": { "comments": [ { "id": "261889", "author": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "body": "You actually need to set the value of the [rightNavButton property|http://docs.appcelerator.com/titanium/latest/#!/api/Titanium.UI.Window-method-setRightNavButton] not to change the view to show in the [right nav bar|http://docs.appcelerator.com/titanium/latest/#!/api/Titanium.UI.Window-property-rightNavButton] area. Simple sample demonstrates the issue: \n\n{code}\nvar button = Ti.UI.createButton({\n systemButton: Ti.UI.iPhone.SystemButton.TRASH\n});\n \nvar win = Titanium.UI.createWindow({\n title: \"Just window\",\n rightNavButton: button\n});\n \nvar navGroup = Ti.UI.iPhone.createNavigationGroup({\n window: win\n});\n \nvar mainWin = Ti.UI.createWindow();\nmainWin.add(navGroup);\nmainWin.open();\n \n// === === ===\n//button.hide();\n//button.visible = false;\n//win.rightNavButton.visible = false;\n//win.rightNavButton.hide();\nsetTimeout(function(){\n\twin.setRightNavButton(null);\t\n}, 3000);\n{code}", "updateAuthor": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-07-15T22:08:06.000+0000", "updated": "2013-07-15T22:08:06.000+0000" }, { "id": "261893", "author": { "name": "sko", "key": "sko", "displayName": "Matej", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Yes I know about it. But if I want to show button than I have to make something like this:\n\n{code:javascript}\nvar button = rightNavButton;\n// HIDE\nwin.setRightNavButton(null);\n\n//SHOW\nwin.rightNavButton = button;\n{code}\n\nI think that is better to fix problem showed above... Thanks", "updateAuthor": { "name": "sko", "key": "sko", "displayName": "Matej", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-07-15T22:16:35.000+0000", "updated": "2013-07-15T22:16:35.000+0000" }, { "id": "261964", "author": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Then can you please state why the following logic wouldn't work for your app?\n\nhttps://github.com/appcelerator/KitchenSink/blob/master/Resources/ui/handheld/ios/baseui/window_navbar.js#L198", "updateAuthor": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-07-16T04:16:37.000+0000", "updated": "2013-07-16T04:16:37.000+0000" }, { "id": "262078", "author": { "name": "sko", "key": "sko", "displayName": "Matej", "active": true, "timeZone": "America/Los_Angeles" }, "body": "It does work and I am already using something like this. Problem is that I want to hide/show button ,but if I want to make this first I have to make this, this and this. There is property/function so why doesn't work? This is absolutely terrible. Milion of bugs, optimization, workaround... I didn't see worse source code like code in my app. Please make life of developer easier and fix this issue. Thank you ;)", "updateAuthor": { "name": "sko", "key": "sko", "displayName": "Matej", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-07-16T19:07:12.000+0000", "updated": "2013-07-16T19:08:07.000+0000" }, { "id": "270743", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "[~egomez] The proposed workaround maybe 'fine' for classic Titanium, but if you use Alloy this requires you to either have the button as a second or next top-level element or to have it there as a starter and remove it later. Agreeing with [~sko] that this is a terrible way to work. I suggest getting it fixed ;)", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2013-09-11T12:59:30.000+0000", "updated": "2013-09-11T12:59:30.000+0000" }, { "id": "418935", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Resolving ticket as Invalid as there is now a new version of Kitchen Sink available and we no longer support the version which relates to this ticket.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-05-02T22:06:09.000+0000", "updated": "2017-05-02T22:06:09.000+0000" }, { "id": "422046", "author": { "name": "rtrueman", "key": "rtrueman", "displayName": "Rob Trueman", "active": true, "timeZone": "America/New_York" }, "body": "How does that fix the issue of showing/hiding a navigation button in Alloy? I'm using 6.1.0GA and still cannot call the .hide() method on a navigation button to hide it. ", "updateAuthor": { "name": "rtrueman", "key": "rtrueman", "displayName": "Rob Trueman", "active": true, "timeZone": "America/New_York" }, "created": "2017-06-15T16:17:02.000+0000", "updated": "2017-06-15T16:17:02.000+0000" }, { "id": "422091", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "[~rtrueman] Hi Rob, please could you open a new ticket on this?", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-06-15T18:54:12.000+0000", "updated": "2017-06-15T18:54:12.000+0000" } ], "maxResults": 8, "total": 8, "startAt": 0 } } }