开发者

Objective-C: How can I freeze the screen and add loading animation?

开发者 https://www.devze.com 2023-02-11 02:59 出处:网络
I made an application which download lots of data and I want to add some animation why it is loading and freeze the screen.

I made an application which download lots of data and I want to add some animation why it is loading and freeze the screen. I have already find function which work but it only freeze button function:

[super setEditing:(BOOL)editing animated:(BOOL)animated]开发者_StackOverflow中文版;
    self.navigationItem.rightBarButtonItem.enabled = !editing;

I' ve seen some application which already use this kind of animation.the image should look like this:

Objective-C: How can I freeze the screen and add loading animation?


You can use NSURLDownload for asynchronous downloads, there is a delegate method which you cane use to determine the progress.

http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Classes/NSURLDownload_Class/Reference/Reference.html

Then using a NSProgressIndicator you can display the progress the same way that image of yours does.


I found something

https://github.com/jdg/MBProgressHUD

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号