Your warning should consist of two views. The first is the screen size and userInteractionEnabled set to YES . This prevents any touching of the views from below. Then you add as a sub-view of this view your actual warning window with any buttons, etc. that you like.
You can include both of them in the new UIWindow , which you can set for windowLevel to make sure they are on top of everything else on the screen.
You can also add a very minor backgroundColor to the screen size, which obscures everything behind it if it suits your interface.
source share