0

I have created a simple table view with delegate and datasource set. I just want to know if the table has loaded all the data in cells, so that I can do another activity like masking and animation After that.

And yes, data is filling cells from the web service.

Neeku
  • 3,646
  • 8
  • 33
  • 43
Jasmin
  • 794
  • 7
  • 18
  • I guess not possible, if your table is loading in viewDidLoad then start your animation in viewWillAppear or viewDidAppear – Mrunal Jul 03 '14 at 10:38
  • In most cases loading is done on the main thread. Therefore if you have a call like `[tableView reloadData]`, when the method returns the loading is done. – dasdom Jul 03 '14 at 10:40

2 Answers2

0

I think You can not know, when all table-cells are loaded with data. It depends on connectivity also. You can try these two possibilities -

1.. You can perform your task by setting a NSTimer with a specific delay. Till then you can rotate a spinner. Problem with case is, if you set large delay value , it will be irksome for the user to use your app.

2.. You can use custom Tableviewcells. With this you can use lazy loading, which will help you to find that perticular cell has loaded its data or not.

Yogendra
  • 1,728
  • 16
  • 28
0

slowest part of your process is loading data from web service. Process all web service calls using completion handler. Table view reload is very fast and you shouldn't see any delay from the time you received data from web service call.

If you are using Coredata and NSFetchedResultsController then you could trigger action using controllerDidChangeContent.