Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-25950] iOS: setUnselectedItemTintColor is unrecognized in iOS9

GitHub Issuen/a
TypeImprovement
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2018-04-10T11:11:16.000+0000
Affected Version/sRelease 6.3.0, Release 7.1.0
Fix Version/sRelease 7.3.0
ComponentsiOS
Labelsios, ios10, tabgroup
ReporterDavid Bankier
AssigneeHans Knöchel
Created2018-04-10T08:03:15.000+0000
Updated2018-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

Comments

  1. Mostafizur Rahman 2018-04-10

    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.
  2. Hans Knöchel 2018-04-10

    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.
  3. David Bankier 2018-04-10

    Basically, just an else with an error log that it isn't support?
  4. Hans Knöchel 2018-04-10

    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).
  5. David Bankier 2018-04-10

    Ok. Rewritten.
  6. Samir Mohammed 2018-06-25

    *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

       [ERROR] :  The 'unselectedItemTintColor' property is only available on iOS 10 and later.
       
    *Test Environment*
       APPC Studio: 5.0.0.201712081732
       APPC CLI: 7.0.4
       iphone 6s (10.2)
       Operating System Name: Mac OS High Sierra
       Operating System Version: 10.13
       Node.js Version: 8.9.1
       Xcode 9.2
       
  7. Samir Mohammed 2018-06-25

    Test Environment missing^
       iphone 6 (9.3) Emulator 
       

JSON Source