Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-23566] iOS: Support global tintColor

GitHub Issuen/a
TypeImprovement
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2016-06-28T16:06:26.000+0000
Affected Version/sn/a
Fix Version/sRelease 6.0.0
ComponentsiOS
Labelsios, tintColor
ReporterHans Knöchel
AssigneeHans Knöchel
Created2016-06-27T21:18:18.000+0000
Updated2016-09-15T07:14:55.000+0000

Description

iOS offers a way to set a global tintColor to be inherited to all child-views. It's a very common concept to ease the branding of the UI and should be used in Titanium as well. Proposed namespace: Ti.UI.tintColor - Setter: Ti.UI.setTintColor

Comments

  1. Hans Knöchel 2016-06-27

    PR: https://github.com/appcelerator/titanium_mobile/pull/8089
  2. Hans Knöchel 2016-06-27

    Demo:
       
       // Set a global tintColor once
       Ti.UI.setTintColor("#f00");
       
       var win = Ti.UI.createWindow({backgroundColor : "#fff", title: "First Window"}); 
       var nav = Ti.UI.iOS.createNavigationWindow({window: win});
       
       var btn = Ti.UI.createButton({
           title : "Open Sub-Window (button should be red)"
       });
       
       btn.addEventListener("click", function() {
           var win2 = Ti.UI.createWindow({backgroundColor : "#fff", title: "Sub Window"}); 
           var btn2 = Ti.UI.createButton({title: "Close Sub-Window (button should be green)", tintColor: "green"});
           
           btn2.addEventListener("click", function() {
               nav.closeWindow(win2);
           });
           
           win2.add(btn2);
           nav.openWindow(win2);
       });
       
       win.add(btn);
       nav.open();
       
  3. Harry Bryant 2016-09-15

    Verified as fixed, Tested On: iPhone 6 Plus 10.0.1 Device & Simulator iPhone 5S 9.3.5 Device Mac OSX El Capitan 10.11.6 Ti SDK: 6.0.0.v20160914165725 Appc Studio: 4.8.0.201609101003 Appc NPM: 4.2.8-6 App CLI: 6.0.0-42 Xcode 8.0 Node v4.4.7 *Closing ticket.*

JSON Source