How to create a full-screen modal status display on iPhone?

最后都变了- 提交于 2019-12-07 18:20:13

问题


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:

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?


回答1:


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/




回答2:


Check out MBProgressHUD.




回答3:


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.



来源:https://stackoverflow.com/questions/2114231/how-to-create-a-full-screen-modal-status-display-on-iphone

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!