[TIMOB-23837] iOS10: Support new TabGroup API's
| GitHub Issue | n/a |
|---|---|
| Type | New Feature |
| Priority | Medium |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2016-08-30T05:51:03.000+0000 |
| Affected Version/s | n/a |
| Fix Version/s | Release 6.1.0 |
| Components | iOS |
| Labels | ios10, tab, tabgroup, tintColor |
| Reporter | Hans Knöchel |
| Assignee | Hans Knöchel |
| Created | 2016-08-29T22:18:25.000+0000 |
| Updated | 2016-11-22T23:27:21.000+0000 |
Description
iOS 10 has the new
UITab API badgeColor and the new UITabBar API unselectedItemTintColor. We should expose both.
Attachments
| File | Date | Size |
|---|---|---|
| chat@2x.png | 2016-08-29T22:52:48.000+0000 | 15748 |
| Screen Shot 2016-11-22 at 3.19.15 PM.png | 2016-11-22T23:21:13.000+0000 | 25438 |
PR: https://github.com/appcelerator/titanium_mobile/pull/8286 Use the attached "chat@2x.png" for the icon that is required for badges - see TIMOB-8880 for possible issue with that. Demo:
var tabGroup = Ti.UI.createTabGroup({ unselectedItemTintColor: "red", tabs: [createTab("Tab 1"), createTab("Tab 2"), createTab("Tab 3"), createTab("Tab 4")] }); // Sets the badge after 3 seconds setTimeout(function() { tabGroup.tabs[1].badge = 3; tabGroup.tabs[1].badgeColor = "gray"; },2000); tabGroup.open(); function createTab(title) { return Ti.UI.createTab({ title: title, icon: "chat.png", window: Ti.UI.createWindow({ title: title }) }) }CR and FT Passed!
Tested with this environment: NPM Version: 2.15.9 Node Version: 4.5.0 Mac OS: 10.12.1 Appc CLI: 6.0.0 Appc CLI NPM: 4.2.8 Titanium SDK version: 6.1.0.v20161122053743 Appcelerator Studio, build: 4.8.0.201611121409 Xcode 8.1 GM I tested with the demo code on an iPhone device v10.1.1, and copied the chat@2x.png in the Resources/iphone folder. A badge appeared after 3 seconds on tab 2 icon. The demo code works as expected. A screenshot of the app output is shown for reference. !Screen Shot 2016-11-22 at 3.19.15 PM.png|thumbnail!