viewDidAppear : is called before view appear

Discussion in 'iOS Programming' started by namanhams, Jun 11, 2009.

  1. namanhams macrumors regular

    Joined:
    Jun 3, 2009
    #1
    Hi everyone,

    I want to do something after the view fully appears on the screen, then i override the viewDidAppear: method of the UIViewController. But it seems that this method is called before the view actually appears.

    Anyone knows how to fix this ? Thanks a lot.
     
  2. mattjgalloway macrumors member

    Joined:
    May 21, 2006
    #2
    Hmmm, it shouldn't be being called before the view actually appears. One thing which is just a guess is that are you calling [super viewDidAppear] before, or after you do your work? I would suggest trying it before. That shouldn't really matter but try it.

    Also, what are you doing in that function? It will be run on the main thread and so it will block anything happening on screen whilst it is processing, so maybe it IS being called at the right time (i.e. just after the view appears) but that the graphics havn't loaded yet because your function is running.

    Just a guess though really. You are right that it *should* be being called directly after the view appears.
     

Share This Page