Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-15436

iOS: Support onTintColor for Ti.UI.Switch

    Details

      Description

      I manually updated TiUiSwitch.m to have the ability to set the onTintColor of the Ti.UI.Switch component.

      A simple Modification:

      -(void)setOnTintColor_:(id)color
      {
       
          if ([color isKindOfClass:[UIColor class]])
          {
       
              [[self switchView] setOnTintColor:color ];
       
          }
          else
          {
              TiColor *ticolor = [TiUtils colorValue:color];
              [[self switchView] setOnTintColor: [ticolor _color ] ];
       
          }
      }
      

      and in Ti Code:

      var aSwitch = Ti.UI.createSwitch({value:true, onTintColor:'#282828'});
      

      and that should do it.

        Attachments

          Activity

            People

            • Assignee:
              vduggal Vishal Duggal (Inactive)
              Reporter:
              underlabs Joseph Sachs
              Reviewer:
              Sabil Rahim
            • Watchers:
              14 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Backbone Issue Sync is enabled for your project, but we do not have any synchronization info for this issue.

                  Git Integration