[TIMOB-25950] iOS: setUnselectedItemTintColor is unrecognized in iOS9
| GitHub Issue | n/a |
|---|---|
| Type | Improvement |
| Priority | Critical |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2018-04-10T11:11:16.000+0000 |
| Affected Version/s | Release 6.3.0, Release 7.1.0 |
| Fix Version/s | Release 7.3.0 |
| Components | iOS |
| Labels | ios, ios10, tabgroup |
| Reporter | David Bankier |
| Assignee | Hans Knöchel |
| Created | 2018-04-10T08:03:15.000+0000 |
| Updated | 2018-06-25T21:49:17.000+0000 |
Description
The Ti.UI.TabGroup property "unselectedItemTintColor" is only available on iOS 10+ and should be guarded.
PR: https://github.com/appcelerator/titanium_mobile/pull/9991
Hello [~dbankier], Thanks for sharing with us. Please provide a full sample test code that regenerates the issue. Better to provide a sample app as an attachment here. We will test the issue in our environment. Also, provide the SDK and CLI version you are testing on.
Hey there [~dbankier]! The PR looks fine. But I'm having a small issue merging it, because it's an API that is made for iOS 10+ only, so using it on lower SDK versions should error out instead of silently be ignored. From a clean code perspective, it's less hacky to just have one parameter object, but technically, it's incorrect. We can accept your PR, but just this as a side note.
Basically, just an
elsewith an error log that it isn't support?Yep, thats usually how it's done. Like for the [Autofill Feature](https://github.com/appcelerator/titanium_mobile/blob/master/iphone/Classes/TiUITextWidget.m#L159-L169).
Ok. Rewritten.
*Closing ticket.* Improvement can be seen in SDK Version:
7.3.0.v20180618182516*FR (Passed) Test Steps:*Created an application with the following code:
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"; },3000); tabGroup.open(); function createTab(title) { return Ti.UI.createTab({ title: title, icon: "chat.png", window: Ti.UI.createWindow({ title: title }) }) }Ran the program
Program launched and console displayed the following message
*Test Environment*Test Environment missing^