How to disable all iOS notifications temporarily while actively using/mirroring the device?
(Since the accepted answer for this question is outdated and the actual answer is buried as a comment, I’m providing a better answer for all future people with this question, in hopes that it will become more visible.)

The default behavior for the Do Not Disturb feature is stopping notifications while the screen is locked, so that your iPad/iPhone won’t keep buzzing in your pocket/backpack/desk while you’re trying to concentrate on something else. 

That’s good, but not what we want. We want to stop notifications while we’re using the device. 

Well, at least since iOS 12 there’s an additional setting within Settings > Do Not Disturb that you can turn on, here:



All you need to do is change the “Silence” option to “Always” in this screen. It will keep any and all notifications away from your screen as you write, read, present content to others, play a game, etc.