I'm trying to simulate a UIAlertView behavior. Basically I want to present a view and disable the user interaction of all other views on screen (besides the presented view). How would I go about doing this?
Your pretend alert view should consist of two views. The first one is the size of the screen and has userInteractionEnabled set to YES. This prevents any touches going through to the views underneath. You then add, as a subview of this view, your actual alert window, with whatever buttons etc. you like.
You can contain both of these in a new UIWindow which you can set the windowLevel on to ensure they are on top of anything else in the screen.
You can also add a very slight backgroundColor to the screen-sized view which will dim everything behind it, if that is appropriate for your interface.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With