How convert CCButton in a Toggle Switch?

You can use Control Surface: CCButtonLatched Class Reference.