ferry
ferry

Reputation: 69

How to display the activity indicator

After clicking the Login Button in the login screen i need to display a transparent View with activity indicator in the middle(spinning) and after some time that should disappear and the next view should be loaded.

please help me in this aspect

thanks rizwan

Upvotes: 1

Views: 1760

Answers (2)

Tomasz Stanczak
Tomasz Stanczak

Reputation: 13164

Place an Activity Indicator View in the middle of the view, selects its style so that it is visible (white or grey), select "hides when stopped", call:

[activity startAnimating];

the activityView will be visible and animating. Then do whatever you want to do, call NSTimer or whatever and when the timer get triggered or your action is finished clal:

[activity stopAnimating];

and the activity view will stop spinning and hide.

Other than using the stock Activity Indicator View you may find useful controls on www.cocoacontrols.com, for exmaple MBProgressHUD's screenshot looks like it were also a candidate for what you want to do.

Upvotes: 1

T9b
T9b

Reputation: 3502

I assume you'll be using ajax for the login and a back-end server side script.

You'll find the "spinning activity indicator" thing in the Apple SDK library Interface Builder as referred to in the comment.

Once your Ajax call has been made - you are waiting for a response. Simply display the activity indicator until you get a response from the server.

Then simply hide it once you have done your processing to load the "next view".

I can't give you an exact answer because your question lacks too much detail.

Upvotes: 0

Related Questions