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

static pointer to UIView problem

Discussion in 'iPhone/iPad Programming' started by 99miles, Feb 27, 2009.

  1. macrumors member

    #1
    I have a UIView in my nib file, defined in the appdelegate as:
    IBOutlet UIView *board;

    I then have a singleton class called 'facade' with:
    UIView *board;

    From the appdelegate I set 'facade.board = board;'

    Then from another class, I retrieve facade.board and I can see that the memory addresses for 'facade.board' is pointing to where it should. However, I can't add to the subview or iterate over the subviews. There're no errors or warning, it just doesn't do anything. But it does have some handle on it because [facade.board.subviews count] works!

    Does anyone have any idea what could be up? I can add subviews to the board if i pass the UIView as a reference, but not when I set it in and retrieve it from the singleton.

    Thanks in advance.
     

Share This Page