iPhone: how do I set up a clear window-size "blocker view"?

Posted by Ben on Stack Overflow See other posts from Stack Overflow or by Ben
Published on 2010-03-22T07:32:57Z Indexed on 2010/03/22 7:41 UTC
Read the original article Hit count: 272

I feel like this should be obvious to me, but for some reason I can't figure this out. I have a navigation interface with nav bar, tool bar, and primary view. Sometimes the user takes an action that causes a progress indicator to appear in the middle of the view.

While the progress indicator (which is a custom UIView) in spinning in the middle, I want no touch input to be allowed to go to any of the underlying interface (main view, nav bar, toolbar, etc). But this doesn't seem trivial.

I've tried (and failed) to create a simple view whose only job is to swallow touch input and use it as a window subview-- no dice, it never gets the touch events (and yes, it does have userInteractionEnabled). I've tried to bolt it on as a transparent modal view controller, but those don't seem to ever be transparent.

Thoughts? What am I missing?

Thanks!

© Stack Overflow or respective owner

Related posts about iphone

Related posts about uiview