Author Topic: iOS 7-like toggle button  (Read 2401 times)

kfboelter

  • Guest
iOS 7-like toggle button
« on: November 29, 2013, 12:05:38 PM »
Hello everyone.

I am looking for a way to make a toggle button like the ones form iOS 7... so far, have not been successful..

Image speaks for itself... the button might be activated (with a green background) or not activated. Clicking or dragging (does not need to be both, although on and iOS device both ways work) changes from one state to the other. It is binary, on and off only.

Any suggestions or tips for me?

Best regards.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: iOS 7-like toggle button
« Reply #1 on: November 29, 2013, 07:41:56 PM »
Create a slider (a very short one, but a slider nonetheless). Foreground - green, background - white. Attach a script to the thumb (the circle) that will set the slider's value to 0 or 1 depending on the current value in OnClick.

kfboelter

  • Guest
Re: iOS 7-like toggle button
« Reply #2 on: November 29, 2013, 11:01:58 PM »
Aren, thank you for being so active over here. Really appreciate it.

I will try that out, and if anything else comes up, I will be back here