{ "id": "153449", "key": "TIMOB-20065", "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": "2015-12-04T18:39:52.000+0000", "created": "2015-11-25T19:23:27.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "ios", "navbar", "navbutton" ], "versions": [ { "id": "14826", "description": "Release 5.1.0-remaining iOS9 features, Android M features", "name": "Release 5.1.0", "archived": false, "released": true, "releaseDate": "2015-11-20" }, { "id": "16778", "description": "Release 5.0.1", "name": "Release 5.0.1", "archived": false, "released": true, "releaseDate": "2015-09-25" }, { "id": "16904", "description": "Release 5.0.2", "name": "Release 5.0.2", "archived": true, "released": true, "releaseDate": "2015-10-01" }, { "id": "16925", "description": "WatchKit Support--all going into 5.0 now", "name": "Release 5.0.0", "archived": true, "released": true, "releaseDate": "2015-09-16" }, { "id": "17532", "name": "Release 5.1.1", "archived": false, "released": true, "releaseDate": "2015-11-24" } ], "issuelinks": [], "assignee": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-24T18:01:17.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": "h6.Issue Description\r\nWhen using a TabGroup within a NavigationWindow, the RightNavButton of any Window within the TabGroup do not appear in the navigation bar.\r\n\r\nh6.Steps to Replicate\r\n-Create a new titanium alloy project\r\n-Open the app folder\r\n-Replace the index.xml file inside views folder and the index.js file inside controllers\r\n-Add the tabs.xml in in the views folder with the test-case code\r\n-Add the tabs.js in in the controllers folder with the test-case code\r\n-Build and run\r\n-Click open window\r\n-The RightNavButton is not showed\r\n\r\nh6. Test Case \r\n//index.xml\r\n{code}\r\n\r\n\t\r\n\t\t\r\n\t\t\t\r\n\t\t\r\n\t\r\n\r\n{code}\r\n//index.js\r\n{code}\r\n\r\n$.nav.open(); \r\n\r\nfunction open(){\r\n\tvar view = Alloy.createController(\"tabs\").getView();\r\n\t\r\n\t$.nav.openWindow(view);\r\n}\r\n{code}\r\n//tabs.xml\r\n{code}\r\n\r\n\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\r\n\r\n{code}\r\n//tabs.js\r\n{code}\r\nvar args = arguments[0] || {};\r\n{code}", "attachment": [], "flagged": false, "summary": "iOS Alloy Missing RightNavButton with TabGroup inside NavigationWindow", "creator": { "name": "rramirez", "key": "rramirez", "displayName": " Ricardo Ramirez", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "rramirez", "key": "rramirez", "displayName": " Ricardo Ramirez", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "iOS 9.1\r\nXcode 7.1.1\r\nTi.SDK 5.1.X & 5.X", "comment": { "comments": [ { "id": "371494", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Do we know if this is a regression? Does it work in 4.X or 3.X?", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-11-25T23:43:51.000+0000", "updated": "2015-11-25T23:43:51.000+0000" }, { "id": "372012", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Is this valid? I don't think we support tabGroup INSIDE a NavWindow. the other way around is more accurate.", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-12-03T03:52:20.000+0000", "updated": "2015-12-03T03:52:20.000+0000" }, { "id": "372062", "author": { "name": "bachmakm", "key": "bachmakm", "displayName": "Kristen Bachman", "active": true, "timeZone": "America/Havana" }, "body": "In combing through community posts, it appears that a [NavigationWindow inside of a TabGroup is discouraged|https://developer.appcelerator.com/question/175579/tackle-navigation-window-in-tab-group-alloy]. \r\n\r\nRegardless, I'm currently writing an app for a victim services client and at several points through the app, 2 categories of data need to be presented. So the tab groups are not used for navigation but are rather used for presenting 2 different kinds of data within a NavigationWindow. Here's [a link|https://drive.google.com/folderview?id=0ByfmzLGVZbiNWm1hWHAyVUs3N3c&usp=sharing] to a few images showing this interaction. In the first screen shot, there's a TabView that shows 2 tabs: General & Crime. General lists \"general\" areas of help (e.g., health, family, unemployment, etc.), and the Crime tab lists specific areas of help related to a crime. Clicking on _Domestic Violence_ leads to a new tab group with 2 tabs: \"Nearby\" and \"Quick Call\". \"Nearby\" shows a list of domestic violence resources while \"Quick Call\" shows a list of resources with crisis numbers/hotlines. Clicking on a resource in the \"Nearby\" table opens a new Window object with details about that resource. \r\n\r\nAt each point in the app, I must include (at least) 2 buttons in the upper right-hand corner. However, in cases where the NavigationWindow is opening a TabGroup, it seems that the navigation controller of the NavigationWindow is hiding the navigation controller of the TabGroup. Unfortunately, I have not found a workaround for this issue. Although _NavigationWindow_ has a {{rightNavButtons}} property, setting that property does not make the _rightNavButtons_ visible. In other words, in index.js, adding the following code has no effect on the navigation bar; no \"test\" button appears: {code}$.nav.setRightNavButtons(Ti.UI.createButton({title:\"test\"}));{code} \r\n\r\nSo the question is, is there a way that I can make the RightNavButtons visible when a NavigationWindow opens a TabGroup? Or do I need to abandon the TabGroup in my iOS implementation and write my own TabGroup implementation that does not have a navigation controller attached to it? ", "updateAuthor": { "name": "bachmakm", "key": "bachmakm", "displayName": "Kristen Bachman", "active": true, "timeZone": "America/Havana" }, "created": "2015-12-03T16:28:40.000+0000", "updated": "2015-12-03T16:38:10.000+0000" }, { "id": "372178", "author": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "body": "[~bachmakm], what you are trying to accomplish is not possible. Both the {{NavigationWindow}} and the {{TabGroup}} are supposed to be top level controllers. What that means is that they are not meant to hold other controllers in them.\r\nWhat you need to do, instead, is to create your own \"TabGroup\" using views and buttons. \r\nSomething like this:\r\n{code}\r\nvar win = Ti.UI.createWindow({\r\n\tbackgroundColor: 'black'\r\n});\r\nvar container = Ti.UI.createView({\r\n\ttop: 0, bottom: 50,\r\n\tleft: 0, right: 0\r\n});\r\nvar buttonBar = Ti.UI.createView({\r\n\tbottom: 0, height: 50,\r\n\tleft: 0, right: 0\r\n});\r\nvar leftButton = Ti.UI.createButton({\r\n\tleft: 0, width: '50%',\r\n\theight: 50,\r\n\ttitle: 'tab 1'\r\n});\r\nvar rightButton = Ti.UI.createButton({\r\n\tright: 0, width: '50%',\r\n\theight: 50,\r\n\ttitle: 'tab 2'\r\n});\r\nbuttonBar.add(rightButton);\r\nbuttonBar.add(leftButton);\r\n\r\nwin.add(container);\r\nwin.add(buttonBar);\r\n\r\n// main views:\r\nvar view1 = Ti.UI.createView({\r\n\tbackgroundColor: 'green'\r\n});\r\ncontainer.add(view1);\r\n\r\nvar view2 = Ti.UI.createView({\r\n\tbackgroundColor: 'blue'\r\n});\r\ncontainer.add(view2);\r\n\r\nview1.visible = true;\r\nview2.visible = false;\r\n\r\nleftButton.addEventListener('click', function(){\r\n\tview1.visible = true;\r\n\tview2.visible = false;\r\n});\r\nrightButton.addEventListener('click', function(){\r\n\tview1.visible = false;\r\n\tview2.visible = true;\r\n});\r\nwin.open();\r\n{code}\r\n", "updateAuthor": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-12-04T18:26:30.000+0000", "updated": "2015-12-04T18:26:30.000+0000" }, { "id": "372180", "author": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "body": "The same can be done with Alloy\r\n{code:xml}\r\n\r\n\t\r\n\t\t \r\n\t\t\t\r\n\t\t\r\n\t\t\r\n\t\t\t\r\n\t\t\r\n\t\r\n\t\r\n\t\t