{ "id": "144214", "key": "TIMOB-18515", "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": "16997", "name": "Release 5.2.0", "archived": false, "released": true, "releaseDate": "2016-02-23" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2015-11-27T10:31:37.000+0000", "created": "2015-02-04T18:32:54.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "notable", "tab", "tabGroup", "tabbar" ], "versions": [ { "id": "16704", "description": "Release 3.5.0", "name": "Release 3.5.0", "archived": false, "released": true, "releaseDate": "2015-01-13" } ], "issuelinks": [ { "id": "50587", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "154927", "key": "TIMOB-20405", "fields": { "summary": "iconInsets: Weird behaviour when not repositioning but also enlarging icon", "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 } } } } ], "assignee": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2016-02-15T14:12:18.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": "The default native way to make a custom (image only) tab bar (like the one on instagram) is to use UIEdgeInsets so we can reposition the image inside the Tab when it has no title text.\r\n\r\nThe best way for making this happen on Titanium is mapping a method and properties, allowing developers to set the Tab Item Insets for the Tab bar image (both for regular as for active images).\r\n\r\nThere is a property on UIBarItem (UIBarButton item inherits from this class) called imageInsets.\r\n\r\n{code:objectivec}\r\ntabBarItem.imageInsets = UIEdgeInsetsMake(6, 0, -6, 0);\r\n{code}\r\n\r\nI suggest a Ti method on the Tab object named setImageInsets() in which developers can pass the absolute values for image insets and properly realign images inside the tabs. It would be ideal to have the imageInsets property as well so we can instance the tabs with the proper insets avoiding rendering flicks.\r\n\r\nThis is the best way to have a native tab bar without using the actual solutions of hiding the tab bar and creating a bunch of custom views on the bottom of the app or using unmaintained modules.\r\n\r\nReferences:\r\n\r\nhttp://stackoverflow.com/questions/10533917/ios-5-custom-tab-bar-image-vertical-alignment\r\nhttp://stackoverflow.com/questions/26494130/remove-tab-bar-item-text-show-only-image", "attachment": [], "flagged": false, "summary": "iOS: TabGroup - Support UIEdgeInsets for Tab items so we can have Instagram-like tabs with only images", "creator": { "name": "ygbr", "key": "ygbr", "displayName": "Ygor Lemos", "active": true, "timeZone": "America/Sao_Paulo" }, "subtasks": [], "reporter": { "name": "ygbr", "key": "ygbr", "displayName": "Ygor Lemos", "active": true, "timeZone": "America/Sao_Paulo" }, "environment": null, "closedSprints": [ { "id": 529, "state": "closed", "name": "2015 Sprint 24 SDK", "startDate": "2015-11-21T01:30:12.670Z", "endDate": "2015-12-05T01:30:00.000Z", "completeDate": "2015-12-07T03:57:17.094Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "371545", "author": { "name": "topener", "key": "topener", "displayName": "Rene Pot", "active": true, "timeZone": "Europe/Berlin" }, "body": "Any progress yet on this issue?", "updateAuthor": { "name": "topener", "key": "topener", "displayName": "Rene Pot", "active": true, "timeZone": "Europe/Berlin" }, "created": "2015-11-26T16:53:00.000+0000", "updated": "2015-11-26T16:53:00.000+0000" }, { "id": "371551", "author": { "name": "designbymind", "key": "designbymind", "displayName": "Jason David Miller", "active": true, "timeZone": "America/Los_Angeles" }, "body": "*+1* · I am also very interested in more TabGroup flexibility :)", "updateAuthor": { "name": "designbymind", "key": "designbymind", "displayName": "Jason David Miller", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-11-26T23:19:12.000+0000", "updated": "2015-11-26T23:19:12.000+0000" }, { "id": "371552", "author": { "name": "mdelmarter", "key": "mdelmarter", "displayName": "Matthew Delmarter", "active": true, "timeZone": "Pacific/Auckland" }, "body": "+1", "updateAuthor": { "name": "mdelmarter", "key": "mdelmarter", "displayName": "Matthew Delmarter", "active": true, "timeZone": "Pacific/Auckland" }, "created": "2015-11-26T23:28:04.000+0000", "updated": "2015-11-26T23:28:04.000+0000" }, { "id": "371573", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Happy Thanksgiving!\r\n\r\nPR: https://github.com/appcelerator/titanium_mobile/pull/7507\r\n\r\nExample (1st tab with 6,0,-6,0 insets, 2nd tab no insets): http://abload.de/img/simulatorscreenshot26mbs5n.png\r\n\r\nRelated demo:\r\n{code:javascript}\r\nTitanium.UI.setBackgroundColor('#fff');\r\nvar tabGroup = Titanium.UI.createTabGroup();\r\n\r\nvar win1 = Titanium.UI.createWindow();\r\nvar tab1 = Titanium.UI.createTab({\r\n\twindow: win1,\r\n\ticon:'images/tabs/KS_nav_ui.png',\r\n\ticonInsets: {\r\n\t\ttop:6,\r\n\t\tbottom:-6,\r\n\t\tright:0,\r\n\t\tleft:0\r\n\t}\r\n});\r\n\r\nvar win2 = Titanium.UI.createWindow();\r\nvar tab2 = Titanium.UI.createTab({\r\n\twindow: win2,\r\n\ticon:'images/tabs/KS_nav_ui.png',\r\n\ttitle: \"Test\"\r\n});\r\n\r\ntabGroup.addTab(tab1);\r\ntabGroup.addTab(tab2);\r\n\r\ntabGroup.open();\r\n{code}", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2015-11-27T06:42:59.000+0000", "updated": "2015-11-27T06:48:30.000+0000" }, { "id": "371592", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "CR and FT Passed. PR Merged! Happy Thanksgiving!", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-11-27T10:31:13.000+0000", "updated": "2015-11-27T10:31:13.000+0000" }, { "id": "371597", "author": { "name": "chmiiller", "key": "chmiiller", "displayName": "Carlos Henrique Zinato", "active": true, "timeZone": "America/Los_Angeles" }, "body": "can't believe this! Finally! Valew @Yg", "updateAuthor": { "name": "chmiiller", "key": "chmiiller", "displayName": "Carlos Henrique Zinato", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-11-27T12:56:19.000+0000", "updated": "2015-11-27T12:56:19.000+0000" }, { "id": "374615", "author": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Verified fixed, using:\r\n\r\nMacOS 10.11.2 (15C50)\r\nStudio 4.4.0.201511241829\r\nTi SDK 5.2.0.v20160114021251\r\nAppc NPM 4.2.2\r\nAppc CLI 5.2.0-224\r\nXcode 7.2 (7C68)\r\nNode v0.12.7\r\nJava 1.7.0_80\r\n\r\nTab icons can now be set with the iconInsets property. Tested using custom app and sample code provided.", "updateAuthor": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-01-14T22:12:16.000+0000", "updated": "2016-01-14T22:12:16.000+0000" } ], "maxResults": 7, "total": 7, "startAt": 0 } } }