It takes a long to start up the application I write on an iPhone. I hope to display a waiting progress bar to indicate the percentage of the startup progress. Can anyone help me? I am new to the Development of IOS.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can’t.
The application needs to be started before you can show any dynamic content.
After your first ViewController is loaded you can of course show a progress bar and do loading.
Before that, you can only show a static image Default.png & Default@2x.png.
If you delay the heavy loading to after your
-[ViewController viewDidLoad]-method is finished you can show any kind of GUI while doing the heavy work.Edit:
This example will detach a new thread in your viewDidLoad and do some heavy work (in this case sleep for 1 second) and update a
UIProgressViewand log the progress as it sleeps 10 times, incrementing the progressview with 0.1 each time.