Fixed a bug with switch interaction when hidden/disabled.

Fixed a bug with the switch which would remain active even if hidden, disabled, or has userInteractionEnabled set to NO.