There is a specific UI guideline for something that can be enabled or not: it's called a tick box. The on-off switch thing is a distinctly iOS invention [1]. The funny thing is that OS X (now macOS) mostly held off using those 'switches' too, until fairly recently.