Customize Switch

You must Login before you can answer or comment on any questions.

Hi Everyone,

Is it possible to change the image that is used in a switch for IOS. I see there is a background image property but when I apply my image nothing changes.

I am using the latest version of the TI Studio and SDK.

Thanks in advance Sean

— asked 8 months ago by sean sean
0 Comments

2 Answers

Accepted Answer

No, the switch does not take a custom background image. If you wanted to create a custom switch you'd either have to build one from low level views or build a native module that allows you to set a bg image.

— answered 8 months ago by Anthony Decena
answer permalink
2 Comments
  • Hi Anthony,

    Thats what I thought but just wanted to confirm since it was in the documentation. Are their any plans to include this in the next version?

    Thanks

    — commented 8 months ago by sean sean

  • Its in the docs because the Switch inherits from a base View and a View has a backgroundImage. Even though all Views will have a bg image property, some Views, mostly controls will override that property natively. There are not plans to change this in any upcoming versions.

    — commented 8 months ago by Anthony Decena

Sean. Have a look at this native module if you want to customise the switch changing its backgroundImages and colours. TintSwitch.

— answered 7 months ago by David Bankier
answer permalink
1 Comment
  • Hi David, I not found the compiled TintSwitch Module on github on Downloads folder.

    Can you help me please. Thank you.

    — commented 2 months ago by nikki defeudis

Your Answer

Think you can help? Login to answer this question!