soumya
soumya

Reputation: 3811

How to load a custom progress bar at loading time

I have requirement where I need to display a progress bar /activity indicator on splash screen untill my data downloading is complete in iOS 7 .

Thanks in advance

Upvotes: 0

Views: 1303

Answers (1)

Hemang
Hemang

Reputation: 27052

If you want to show custom (or native) activity indicator then you don't need custom splash images to show as splash screen in app (that means no need to add Default.png | [email protected] (etc.). But yes, you'll need to add [email protected] (can be add by XCode it self) if you're going to support iPhone5 resolution too.

  1. Add a UIViewController named "SplashViewController"

  2. Add an UIImageView inside SplashViewController (as subview) - you can add it programmatically too. Cocoa Touch - Adding a UIImageView programmatically? - this question may helpful.

  3. Assign a background image to it (which you're showing for splash screen).

  4. Add a custom (or native) activity (progress) indicator inside SplashViewController (as subview) - you can add it programmatically too. Setting up an UIActivityIndicatorView for the UITableViewController programmatically - this question may helpful.

  5. Customise indicator as per the need. (configure for when to start/stop?).

  6. Do you downloading stuff, and when its done, just change the root view controller to the next view controller (which you want to show after downloading stuff gets done). Programmatically change rootViewController of storyBoard - this question may helpful.

Upvotes: 1

Related Questions