1. Welcome to the new MacRumors forums. See our announcement and read our FAQ

view init in iphone OS

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

  1. macrumors newbie

    #1
    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.

    thanks

    bk
     
  2. macrumors 65816

    Sbrocket

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

    #3
    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