view init in iphone OS

Discussion in 'Mac Programming' started by bkphat, Jun 18, 2008.

  1. macrumors newbie

    Jun 8, 2008
    What method is called once a view is displayed fully?
    Specifically, I have added a subview to a superview. Only when this subview is fully visible on screen (which may take a while due to content) do I want to execute this function. I tried didMoveSuperview and didMoveToWindow, but both are called before the view is displayed to the user.


  2. macrumors 65816


    Jun 3, 2007
    viewDidAppear: is sent to the view controller. I haven't used it before, but that should be what you want.
  3. macrumors regular

    Jan 18, 2006
    viewDidLoad: is called right after the view loads, and is usually only called once. The viewWillAppear or viewDidAppear methods are called every time that particular view appears on screen, so they could be called multiple times depending on how much switching back and forth between views you do.

Share This Page