Resolved UIActivityIndicator

Discussion in 'iOS Programming' started by DennisBlah, May 24, 2014.

  1. DennisBlah, May 24, 2014
    Last edited: May 25, 2014

    DennisBlah macrumors 6502

    DennisBlah

    Joined:
    Dec 5, 2013
    Location:
    The Netherlands
    #1
    Hey all. I'm having trouble with adding an activity indicator.

    On some points my app is taking long to load.
    This is because the app is loading images from the web, and when you are on 3G it's a bit slow. (ofcourse)

    I'm loading the images in an tableview. (costum cell)
    I tried to put the indicator to start before it stars loading the image from web and stop after.

    But... the viewcontroller is not been shown before the datasource is done?

    I tried to start animation of the spinner before my function starts to instantiate the new viewcontroller
    and stop it when it is presented. But the spinner already disappears.

    Is there anyone with bright idea's how to solve this?

    thanks!
     
  2. DennisBlah thread starter macrumors 6502

    DennisBlah

    Joined:
    Dec 5, 2013
    Location:
    The Netherlands
    #2
    I found the problem.

    In the view didLoad and the didApear I'm setting [indicator startAnimating];
    Removed all events and call an NSTimer with an loadingFunction.

    In the loadingFunction I'm doing all my events to load data and prepare my lists.
    After that I set [indicator stopAnimating];
     

Share This Page