{ "id": "128874", "key": "TIMOB-16887", "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": [], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2018-12-12T14:21:54.000+0000", "created": "2014-04-10T14:41:03.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "ios" ], "versions": [ { "id": "15857", "description": "Release 3.2.2", "name": "Release 3.2.2", "archived": false, "released": true, "releaseDate": "2014-03-09" } ], "issuelinks": [ { "id": "56890", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "172171", "key": "TIMOB-26354", "fields": { "summary": "Android: Refactor TabGroup and introduce new style", "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": "Low", "id": "4" }, "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } } ], "assignee": null, "updated": "2018-12-12T14:21:54.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": "10224", "name": "TiAPI", "description": "This component is used for cross-platform API work. Specifications are most likely to use this component." } ], "description": "I would like to have an event that fires when handleWillShowTab is fired. Currently, the focus-event fires when handleDidShowTab has fired. I would like to do some UI-changes while changing tab, and found that firing an event in handleWillShowTab instead makes it a bit quicker (probably because it's fired before the tab content is rendered?)\r\n\r\nAs a quick fix I created my own event called \"willShowTab\", as I'm sure there are different use-cases for events just before and after the tab has changed.", "attachment": [], "flagged": false, "summary": "TiAPI: Add an event on TabGroup that fires before a Tab is focused", "creator": { "name": "arood", "key": "arood", "displayName": "Marcus Olovsson", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "arood", "key": "arood", "displayName": "Marcus Olovsson", "active": true, "timeZone": "Europe/Berlin" }, "environment": "iOS 7", "comment": { "comments": [ { "id": "302124", "author": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I could not find a reference to handleWillShowTab and handleDidShowTab events. I would appreciate if you can point me to these events in the documentation.", "updateAuthor": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-04-23T04:16:00.000+0000", "updated": "2014-04-23T04:16:00.000+0000" }, { "id": "302182", "author": { "name": "arood", "key": "arood", "displayName": "Marcus Olovsson", "active": true, "timeZone": "Europe/Berlin" }, "body": "Ah my mistake, it was just a method name I found in TiUITabGroup.m, it seems like it's fired from \r\n\r\n-(void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated\t", "updateAuthor": { "name": "arood", "key": "arood", "displayName": "Marcus Olovsson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2014-04-23T14:16:08.000+0000", "updated": "2014-04-23T14:16:08.000+0000" }, { "id": "302334", "author": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Thanks for your clarification. Can you please describe what user action or change should trigger this event at the application level?", "updateAuthor": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-04-24T05:47:49.000+0000", "updated": "2014-04-24T05:47:49.000+0000" }, { "id": "302337", "author": { "name": "arood", "key": "arood", "displayName": "Marcus Olovsson", "active": true, "timeZone": "Europe/Berlin" }, "body": "Sorry, I'm not sure I understand the question?", "updateAuthor": { "name": "arood", "key": "arood", "displayName": "Marcus Olovsson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2014-04-24T06:02:55.000+0000", "updated": "2014-04-24T06:02:55.000+0000" }, { "id": "302340", "author": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "It would be great if you can provide a code sample to show how you will use this event to help your use case.", "updateAuthor": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-04-24T06:06:05.000+0000", "updated": "2014-04-24T06:06:05.000+0000" }, { "id": "302343", "author": { "name": "arood", "key": "arood", "displayName": "Marcus Olovsson", "active": true, "timeZone": "Europe/Berlin" }, "body": "Okay, in my case I use it to change the tintColor of the TabGroup. When using the current focus event, you definitely notice some lag when the tab has changed, since the views inside has to be redrawn as well (I guess).\r\n\r\nWith this new event the tabgroup changes color before redrawing the inner views, which makes the transition between tabs much smoother.\r\n\r\n{code}\r\nif (Ti.Platform.osname === \"iphone\") {\r\n tabGroup.addEventListener('willShowTab', function(e) {\r\n tabGroup.tintColor = myTabConfig[e.index].tintColor;\r\n });\r\n}\r\n{code}", "updateAuthor": { "name": "arood", "key": "arood", "displayName": "Marcus Olovsson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2014-04-24T06:14:13.000+0000", "updated": "2014-04-24T06:14:13.000+0000" }, { "id": "302651", "author": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Moving this feature request to engineering for further evaluation and prioritization. There may be a better way to achieve the same using current events though.", "updateAuthor": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-04-28T04:47:14.000+0000", "updated": "2014-04-28T04:47:14.000+0000" }, { "id": "444552", "author": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket due to the above dialogue. If this is a mistake please feel free to re-open this ticket. ", "updateAuthor": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-12-12T14:21:54.000+0000", "updated": "2018-12-12T14:21:54.000+0000" } ], "maxResults": 13, "total": 13, "startAt": 0 } } }