Whoa! Please don't do something like this.
What's happening here is that you are trying to add a view. And then you have a loop to block the execution of EVERYTHING. So during that time, your app can't do anything (such as showing the view?) And then once the loop is over, you remove the view. So nothing ever shows.
When you have the loop there to waste time, nothing is getting done. This is bad, just like sleeping the main thread. What you want to do instead is add the view. And then you set an NSTimer to fire later. When it fires, you hide the view. Or you can do it with performSelector withDelay methods. Just don't block the execution of the whole app! (Because the app will freeze during that time, and when it goes on for too long, the OS will even kill it!)
|