How to access NSMutableArray between two classes?

Discussion in 'iOS Programming' started by mandude, Dec 12, 2010.

  1. macrumors member

    Joined:
    Nov 19, 2009
    #1
    hey i have an NSMutableArray that contains a list of images. This NSMutableArray is declared in one of my classes, viewCtroller.h


    Code:
    
    @interface viewController : UIViewController {
    
    NSMutableArray *array;
    }
    @property (nonatomic, retain) NSMutableArray *array;
    
    ok so nothing too special but in my other class, secondViewController, i'd like that same NSMutableArray *array to be detected by the secondViewContrller.m file. I need to be able to insert or remove object from the array from a different .m file how do i do this? I know i cant write the declaration of the array above the @interface section because i cant have a static NSMutable array all help is appreciated
     

Share This Page