iOS: Sounds when Headphones Are Plugged in but Silent Otherwise?
The silent switch on the left of the device allows one to completely mute (orange in picture below) or unmute all sounds when no headphones are plugged in.

However, when headphones are plugged in, third-party app sounds (e.g.: game music/sfx, video sounds, etc.) will still play through the headphones whether the switch is activated or not.

Unfortunately, there is currently no way to achieve the same behavior for system sounds and Apple apps.