This is a really bad idea, and I hate it because you are banning your users. With that said, AirPlay mirroring works just like connecting a VGA / HDMI adapter, when you plug in the adapter, you can display whatever you want on the “second monitor”. If you want to “block” mirroring, you can set the external display window to a clean / solid black look.
Most iOS applications create and use only one window during their lifetime. This window covers the entire main screen of the device and is loaded from the main nib application file (or created programmatically) at an early stage of using the application. However, if an application supports the use of an external display for a video call, it may create an additional window for displaying content on that external display. All other windows are usually created by the system and are usually created in response to certain events, such as an incoming phone call.
Check out View the programming guide for iOS , specifically the Windows section and Display content on an external display.
source share