Access NSMutableArray from a different class

前端 未结 3 1235
自闭症患者
自闭症患者 2021-01-25 22:55

I have a class where a NSMutableArray object is formed, as so:

navBarColour = [[NSMutableArray alloc] initWithObjects:colourOfNavBar, nil];

I t

3条回答
  •  长情又很酷
    2021-01-25 23:27

    You must add a property to the object containing the array and synthesize it:

    @property(nonatomic, retain) NSMutableArray *navBarColour;
    

    Also, change the compiler to Clang and the error messages will be more clear, if you like.

提交回复
热议问题