[TIMOB-19759] iOS: Parity: tab listeners
GitHub Issue | n/a |
---|---|
Type | Improvement |
Priority | Low |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2015-12-07T05:25:20.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 5.2.0 |
Components | iOS |
Labels | qe-5.2.0, tab, tabGroup |
Reporter | Chee Kiat Ng |
Assignee | Angel Petkov |
Created | 2015-10-22T02:00:26.000+0000 |
Updated | 2016-02-15T13:50:48.000+0000 |
Description
On Android you listen for the events on the Tab object, but on iOS you listen for the events on the TabGroup.
On Android, Windows and iOS the TabGroup has a
focus
event with information on the previous and current active tab, even though it is [documented as Android and Windows only](http://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.TabGroup-event-focus). For iOS we've now addedselected
andunselected
events to the TabGroup with TIMOB-18099, which really should have been added to the Tab, like [Android](http://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.Tab-event-selected) has. * TIMOB-18099 should be reverted. * The TabGroup'sfocus
event should be documented for iOS as well. * Theselected
andunselected
events should be added to the Tab for both iOS and Windows.PR pending https://github.com/appcelerator/titanium_mobile/pull/7498.
Shouldn't we first deprecate the tabgroup's selected and unselected events we've added in 5.1.0 and remove them in 6.0? Also, I think the PR is missing adding iOS as platform to the tabgroup's focus and blur events?
[~apetkov] Kindly address the comments.
PR updated. Deprecated the unselected/selected events. Also added platform tags to the focus/blur events on the docs.
PR merged.
Verified fixed,
focus
event now returns deprecated message, in favour of newselected
&unselected
events. New events working correctly. Tested on: iPhone 6s Plus Device (9.2) & iPhone 6 Plus Device (8.4) Mac OSX El Capitan 10.11 (15A284) Ti SDK: 5.2.0.v20160114021251 Appc NPM: 4.2.3-1 App CLI: 5.2.0-231 Xcode 7.2 Node v4.2.3 *Closing Ticket.*