views:

493

answers:

3

I'm trying to create a modal status indicator display for an iPhone app, and would like one similar to this one used in Tweetie:

alt text

Specifically, this one "shades out" the entire screen, including the toolbar. I don't believe through any normal UIView manipulation, I can extend past the bounds of my window, can I? I believe I've seen a status indicator like this somewhere else on iPhone, possibly when I added an Exchange e-mail account.

I've tried subclassing UIAlertView and overriding its drawRect method. If I don't call [super drawRect:] it doesn't ever display the normal UIAlertView text box, however my drawing rectangle is in an odd size and position.

Anyone have any advice to accomplish this?

A: 

I haven't done this myself, but you could layer a UIView at the top of the view hierarchy, and use setHidden to dynamically show or hide it. Since it's at the top of the stack, it should be able to intercept all touch events.

Shaggy Frog
I tried adding a UIView from the drawRect in my UIAlertView subclass, however it's still suffering from the weird frame dimensions.
ChrisW
You're adding your UIView at the wrong point. Add it as a subview of your root view controller's view and set it to Hidden.
Shaggy Frog
+1  A: 

Check out MBProgressHUD.

Mark Smith
+3  A: 

Take a look at the source code to the WordPress application. They have code which you can basically drag and drop into your application to do this.

http://iphone.wordpress.org/development/

Lounges
That does exactly what I'm looking for -- thanks!
ChrisW