{ "id": "124232", "key": "TIMOB-16094", "fields": { "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "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": "15939", "description": "2014 Sprint 07", "name": "2014 Sprint 07", "archived": true, "released": true, "releaseDate": "2014-04-11" }, { "id": "15940", "description": "2014 Sprint 07 SDK", "name": "2014 Sprint 07 SDK", "archived": true, "released": true, "releaseDate": "2014-04-11" }, { "id": "15422", "description": "Release 3.3.0", "name": "Release 3.3.0", "archived": false, "released": true, "releaseDate": "2014-07-16" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2014-04-08T21:08:15.000+0000", "created": "2013-12-27T16:18:23.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "module_navwindow", "qe-closed-3.3.0", "qe-testadded", "supportTeam" ], "versions": [ { "id": "15593", "description": "Release 3.1.3", "name": "Release 3.1.3", "archived": true, "released": true, "releaseDate": "2013-09-18" }, { "id": "14982", "description": "Release 3.2.0", "name": "Release 3.2.0", "archived": false, "released": true, "releaseDate": "2013-12-19" } ], "issuelinks": [ { "id": "39580", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "inwardIssue": { "id": "110852", "key": "TIMOB-16097", "fields": { "summary": "iOS: Add additional left/right NavButtons", "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" } }, "priority": { "name": "Critical", "id": "1" }, "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } }, { "id": "36367", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "119985", "key": "TIMOB-15285", "fields": { "summary": "iOS7: Translucent Toolbar in Translucent Navigation Group not rendering correctly", "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" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "39121", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "84455", "key": "TIMOB-6975", "fields": { "summary": "iOS: Allow toolbars in nav bar (currently always width 0)", "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" } }, "priority": { "name": "Medium", "id": "3" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2014-08-05T16:02:38.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. Request\r\n\r\nSince iOS 7 the left and right space in the NavButtons has been increased and this is causing that some apps have issues with the look and feel of their app, would be useful to the developers to be able to set this space in order to avoid issues with their design.\r\n\r\nh3. Native Workaround\r\n\r\nThere are some workaround in obj-C that allow the developer to play with negative spacers or imageInsets that allow them to preserve the original design.\r\n\r\nNegative spacer\r\nhttp://stackoverflow.com/questions/18914812/how-to-edit-empty-spaces-of-left-right-uibarbuttonitem-in-uinavigationbar-in-io\r\n\r\n{code}\r\nUIBarButtonItem *negativeSpacer = [[UIBarButtonItem alloc]\r\n initWithBarButtonSystemItem:UIBarButtonSystemItemFixedSpace\r\n target:nil action:nil];\r\nnegativeSpacer.width = -16;// it was -6 in iOS 6\r\n[self.navigationItem setLeftBarButtonItems:[NSArray arrayWithObjects:negativeSpacer, requriedButton/*this will be the button which u actually need*/, nil] animated:NO];\r\n{code}\r\n\r\nimageInsets\r\nhttp://stackoverflow.com/questions/18861201/uibarbuttonitem-with-custom-view-not-properly-aligned-on-ios-7-when-used-as-left\r\n\r\n{code}\r\n// Add your barButtonItem with custom image as the following \r\nUIBarButtonItem *barButton = [[UIBarButtonItem alloc] initWithTitle:@\"\" style:UIBarButtonItemStyleBordered target:self action:@selector(categoryButtonPressed)];\r\n// set your custom image\r\n[barButton setImage:categoryImage];\r\n// finally do the magic\r\nbarButton.imageInsets = UIEdgeInsetsMake(0.0, -20, 0, 0);\r\n{code}\r\n\r\n", "attachment": [], "flagged": false, "summary": "iOS 7: Allow users to set negative spacer in Window NavButton", "creator": { "name": "mcota", "key": "mcota", "displayName": "Marco Cota", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "mcota", "key": "mcota", "displayName": "Marco Cota", "active": false, "timeZone": "America/Los_Angeles" }, "environment": "Product: Titanium SDK\r\nTitanium SDK: Mobile 3.1GA\r\nPlatform OS: iOS\r\nPlatform OS Version: 7", "comment": { "comments": [ { "id": "299570", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "\nExposed new properties leftNavButtons and rightNavButtons on Ti.UI.Window\n\nTest case\n\n{code}\nfunction win_nav(_args) {\n // current window\n var win = Titanium.UI.createWindow({\n title:_args.title\n });\n \n //\n // TOGGLE TITLE\n //\n var b1 = Titanium.UI.createButton({\n title:'Title',\n height:40,\n width:145,\n top:10,\n left:10\n });\n \n b1.addEventListener('click', function()\n {\n if (win.title != 'New Title')\n {\n win.title = 'New Title';\n }\n else\n {\n win.title = 'Window NavBar';\n }\n });\n \n win.add(b1);\n \n //\n // TOGGLE TITLE PROMPT\n //\n var b2 = Titanium.UI.createButton({\n title:'Title Prompt',\n height:40,\n width:145,\n top:10,\n right:10\n });\n \n b2.addEventListener('click', function()\n {\n if (win.titlePrompt != 'Title Prompt')\n {\n win.titlePrompt = 'Title Prompt';\n }\n else\n {\n win.titlePrompt = null;\n }\n });\n \n win.add(b2);\n \n //\n // TOGGLE TITLE IMAGE\n //\n var b3 = Titanium.UI.createButton({\n title:'Title Image',\n height:40,\n width:145,\n top:60,\n left:10\n });\n \n b3.addEventListener('click', function()\n {\n Titanium.API.info('title image ' + win.titleImage);\n \n if (win.titleImage == null)\n {\n win.titleControl = null;\n win.titleImage = '/images/slider_thumb.png';\n }\n else\n {\n win.titleImage = null;\n }\n });\n \n win.add(b3);\n \n //\n // TOGGLE TITLE CONTROL\n //\n var b4 = Titanium.UI.createButton({\n title:'Title Control',\n height:40,\n width:145,\n top:60,\n right:10\n });\n \n var control = false;\n b4.addEventListener('click', function()\n {\n if (!control)\n {\n var sw = Titanium.UI.createSwitch({value:false});\n win.titleControl = sw;\n control = true;\n }\n else\n {\n win.titleControl = null;\n control = false;\n }\n });\n \n win.add(b4);\n \n //\n // TOGGLE NAV BAR VISIBILITY\n //\n var b5 = Titanium.UI.createButton({\n title:'Hide/Show Nav',\n height:40,\n width:145,\n top:110,\n left:10\n });\n var hidden=false;\n b5.addEventListener('click', function()\n {\n if (!hidden)\n {\n win.hideNavBar();\n hidden = true;\n }\n else\n {\n win.showNavBar();\n hidden = false;\n }\n });\n win.add(b5);\n \n //\n // TOGGLE BAR COLOR\n //\n var b6 = Titanium.UI.createButton({\n title:'Bar Color',\n height:40,\n width:145,\n top:110,\n right:10\n });\n \n var barcolor=false;\n b6.addEventListener('click', function()\n {\n if (!barcolor)\n {\n win.barColor = '#336699';\n barcolor = true;\n }\n else\n {\n win.barColor = null;\n barcolor = false;\n }\n });\n \n win.add(b6);\n \n //\n // TOGGLE LEFT NAV BUTTON\n //\n var b7 = Titanium.UI.createButton({\n title:'Left Nav',\n height:40,\n width:145,\n top:160,\n left:10\n });\n \n var leftnav=false;\n b7.addEventListener('click', function()\n {\n if (!leftnav)\n {\n var b = Titanium.UI.createButton({title:'Left Nav'});\n win.leftNavButton = b;\n leftnav = true;\n }\n else\n {\n win.setLeftNavButton(null);\n leftnav = false;\n }\n });\n \n win.add(b7);\n \n //\n // TOGGLE RIGHT NAV BUTTON\n //\n var b8 = Titanium.UI.createButton({\n title:'Right Nav',\n height:40,\n width:145,\n top:160,\n right:10\n });\n \n var rightnav=false;\n b8.addEventListener('click', function()\n {\n if (!rightnav)\n {\n var b = Titanium.UI.createButton({title:'Right Nav'});\n win.rightNavButton = b;\n rightnav = true;\n }\n else\n {\n win.setRightNavButton(null);\n rightnav = false;\n }\n });\n \n win.add(b8);\n \n //\n // TOGGLE BACK BUTTON TITLE\n //\n var b9 = Titanium.UI.createButton({\n title:'Back Button Title',\n height:40,\n width:145,\n top:210,\n left:10\n });\n \n var backtitle=false;\n b9.addEventListener('click', function()\n {\n if (!backtitle)\n {\n win.backButtonTitleImage = null; \n win.backButtonTitle = 'It Worked!';\n backtitle = true;\n }\n else\n {\n win.backButtonTitleImage = null; \n win.backButtonTitle = 'Base UI';\n backtitle = false;\n }\n });\n \n win.add(b9);\n \n //\n // TOGGLE BACK BUTTON TITLE IMAGE\n //\n var b10 = Titanium.UI.createButton({\n title:'Back Button Image',\n height:40,\n width:145,\n top:210,\n right:10\n });\n \n var backtitleimage=false;\n b10.addEventListener('click', function()\n {\n if (!backtitleimage)\n {\n win.backButtonTitleImage = '/images/slider_thumb.png'; \n backtitleimage = true;\n }\n else\n {\n win.backButtonTitleImage = null; \n backtitleimage = false;\n }\n });\n \n win.add(b10);\n \n var b11 = Titanium.UI.createButton({\n title:'Back button BG',\n height:40,\n width:145,\n top:260,\n left:10\n });\n \n var colored = false;\n b11.addEventListener('click', function()\n {\n if (!colored) {\n var backbutton = Titanium.UI.createButton({\n title:'BG nav', \n backgroundImage:'/images/chat.png',\n width:100,\n height:20\n });\n backbutton.addEventListener('click', function() {\n win.close();\n });\n win.leftNavButton = backbutton;\n colored = true;\n }\n else {\n win.leftNavButton = null;\n colored = false;\n }\n });\n win.add(b11);\n \n //\n // BACKGROUND IMAGE ON NORMAL BUTTON\n //\n var b12 = Titanium.UI.createButton({\n title:'Button With Image',\n height:40,\n width:145,\n top:260,\n right:10\n });\n b12.addEventListener('click', function()\n {\n var b = Ti.UI.createButton({\n backgroundImage:'/images/camera.png',\n height:33,\n width:33\n });\n win.rightNavButton = b;\n });\n win.add(b12);\n \n var b13 = Titanium.UI.createButton({\n title:'Set Label',\n height:40,\n width:145,\n top:310,\n left:10\n });\n \n b13.addEventListener('click', function()\n {\n var l = Ti.UI.createLabel({\n text:'Hello',\n color:'#0f0',\n font:{fontSize:14}\n });\n win.rightNavButton = l;\n });\n win.add(b13);\n \n var b14 = Titanium.UI.createButton({\n title:'Set Bar Image',\n height:40,\n width:145,\n top:310,\n right:10\n });\n \n b14.addEventListener('click', function()\n {\n if(win.barImage)\n {\n win.barImage = null;\n }\n else\n {\n win.barImage = '/images/corkboard.jpg';\n }\n });\n win.add(b14);\n return win;\n};\n\nfunction win_nav2(_args) \n{\n var win1 = Titanium.UI.createWindow({\n title:_args.title,\n layout:'vertical'\n });\n\n var l1 = Ti.UI.createLabel({text:'LEFT NAV'});win1.add(l1);\n var b11 = Ti.UI.createButton({title:'SINGLE'});win1.add(b11);\n var b12 = Ti.UI.createButton({title:'MULTI'});win1.add(b12);\n var b13 = Ti.UI.createButton({title:'RESET'});win1.add(b13);\n var l2 = Ti.UI.createLabel({text:'RIGHT NAV'});win1.add(l2);\n var b21 = Ti.UI.createButton({title:'SINGLE'});win1.add(b21);\n var b22 = Ti.UI.createButton({title:'MULTI'});win1.add(b22);\n var b23 = Ti.UI.createButton({title:'RESET'});win1.add(b23);\n\n var v1 = Ti.UI.createButton({ \n systemButton: Ti.UI.iPhone.SystemButton.BOOKMARKS \n });\n\n var v2 = Ti.UI.createButton({ \n systemButton: Ti.UI.iPhone.SystemButton.CAMERA,\n width:-16 \n });\n\n var v3 = Ti.UI.createButton({ \n systemButton: Ti.UI.iPhone.SystemButton.COMPOSE \n });\n \n var v4 = Ti.UI.createButton({ \n systemButton: Ti.UI.iPhone.SystemButton.ACTION \n });\n\n b11.addEventListener('click',function(e){win1.leftNavButton = v1});\n b12.addEventListener('click',function(e){win1.leftNavButtons = [v1,v2]});\n b13.addEventListener('click',function(e){win1.leftNavButtons = null});\n b21.addEventListener('click',function(e){win1.rightNavButton = v3});\n b22.addEventListener('click',function(e){win1.rightNavButtons = [v3,v4]});\n b23.addEventListener('click',function(e){win1.rightNavButtons = null});\n\n return win1;\n}\n\nvar navWin = Ti.UI.createWindow({title:'Nav Test'});\nvar n1 = Ti.UI.createButton({title:'REGRESSION', top:100});\nvar n2 = Ti.UI.createButton({title:'MULTI BUTTONS', top:200});\n\nnavWin.add(n1);\nnavWin.add(n2);\n\nvar ng = Ti.UI.iOS.createNavigationWindow({\n window:navWin,\n backgroundColor:'white'\n});\n\nng.open();\n\nn1.addEventListener('click',function(e) {\n var newWin = win_nav({title:'Window Properties'});\n\n ng.openWindow(newWin);\n})\n\nn2.addEventListener('click',function(e) {\n var newWin = win_nav2({title:'MULTI TEST'});\n\n ng.openWindow(newWin);\n})\n{code}", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-04-01T23:25:01.000+0000", "updated": "2014-04-01T23:25:01.000+0000" }, { "id": "299571", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Pull pending against master\r\nhttps://github.com/appcelerator/titanium_mobile/pull/5570", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-04-01T23:28:43.000+0000", "updated": "2014-04-01T23:28:43.000+0000" }, { "id": "302373", "author": { "name": "nmittal", "key": "nmittal", "displayName": "Neha Mittal", "active": true, "timeZone": "Asia/Kolkata" }, "body": "Verified fix with below environment:\r\n\r\nAppc Studio: 3.3.0.201404211130\r\nSDK build: 3.3.0.v20140423155715\r\nacs: 1.0.14\r\nnpm: 1.3.2\r\nalloy: 1.4.0-dev\r\nCLI: titanium-3.3.0-dev\r\ntitanium-code-processor:1.1.1-beta1\r\nXcode: 5.1.1\r\nOsx: Mavericks(10.9.2)\r\nDevice: iPhone 5C (7.1)\r\n\r\nAble to set the empty spaces of left, right in Window NavButton. Hence closing the issue.", "updateAuthor": { "name": "nmittal", "key": "nmittal", "displayName": "Neha Mittal", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2014-04-24T11:30:35.000+0000", "updated": "2014-04-24T11:30:35.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }