I have a NSMutable array defined in NSObject class like this
NSMutableArray *allbilltypeArray=[[NSMutableArray alloc] initWithArray:[sqlite executeQuery:@"SELECT * FROM dir_AddBillName"]];
Now I want to get element one by one from this NSMutablearray in another view controller.How can I do this in another view controller.
Thanks in advance,
You want to declare the NSMutableArray as a property of its containing class in the header file, like so:
You should then synthesise the property in the implementation file.
Now if you declare an instance of the class that contains the array in another view controller like so (or similar):
you will be able to access a particular element in the array by doing something like:
Or loop through them all like so:
Hope this helps.