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?
I’m trying to simulate a UIAlertView behavior. Basically I want to present a view
Share
Your pretend alert view should consist of two views. The first one is the size of the screen and has
userInteractionEnabledset toYES. 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
UIWindowwhich you can set thewindowLevelon to ensure they are on top of anything else in the screen.You can also add a very slight
backgroundColorto the screen-sized view which will dim everything behind it, if that is appropriate for your interface.