Fix for the switch interrupting the back buttons sometimes. 

We now only flick the switch if the switch is in the current view heirarchy.

Fix for https://github.com/beautify/beautify-ios/issues/61.