0

So I've been using the google calendar API (objective C) and have been able to retrieve, add, edit, remove events and all but Im having problems with the whole asynchronous part of it all.

What I'm hoping to do is load all the events into a simple array and store it in my "Day" object...which I actually have working but I was hoping to do this while the app's launch image is on screen. So I figured I should put my code in here ...

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions

Obviously what happens is the google calendar code starts running when the launch image is displayed but because its asynchronous the app loads up (launch image is removed) while the code has yet to finish.

user1135469
  • 1,020
  • 11
  • 22

1 Answers1

0

You can put the same image there image there manually, so when the automatic one disappears, it's replaced with another. Then fire some method to remove that image view when the calendar code is complete.

dbrajkovic
  • 3,693
  • 1
  • 17
  • 14
  • Cheers. I got that to work. But I was hoping to understand this whole asynchronous thing a bit better. So they're just other threads running simultaneously with my main thread right? If so is there a way to tell my main thread to wait for the others? – user1135469 Feb 25 '12 at 07:34