Csabi
Csabi

Reputation: 3043

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

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];
    self.navigationItem.rightBarButtonItem.enabled = !editing;

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

Upvotes: 1

Views: 3855

Answers (2)

Csabi
Csabi

Reputation: 3043

I found something

https://github.com/jdg/MBProgressHUD

Upvotes: 2

Antwan van Houdt
Antwan van Houdt

Reputation: 6991

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.

Upvotes: 2

Related Questions