I am trying to load UIActivityIndicatorView custom class, however, I am trying to embed generic time delay before a new view pop’s up after my UIActivityIndicatorView shows. I tried the perform afterDelay part, but that doesn’t supposedly stop the main thread but rather execute something after 5 seconds. What I am looking for is something that could actually stop the execution until 5 seconds have been elapsed. Is there anyway to do this in iPhone? I can certainly write another method and invoke the new view popup in there after certain delay, but then I would have to invoke this way generally on every viewController. Is there any generic way to bypass this?
I am trying to load UIActivityIndicatorView custom class, however, I am trying to embed
Share
Your UI activity indicator won’t show until you exit to the main run loop. The way to stop execution of your app is to exit (return from) your current method.
To finish doing stuff after 5 seconds, put it in another method, and use an NSTimer or delayed operation queue to restart your app’s processing. This is the generic solution that won’t cause the UI (and activity indicators) to freeze up.