tags:

views:

41

answers:

2

i am a new iphone programmer i want to create an array that keeps adding a value at its last position when i moving from one view to another because at last view ,i need that full array which has all values from all views.... i tried taking an array and sending it view to next view (array is defined in all views) but when i tried to put value to it

A: 

You can use NSMutableArray class with addObject: in order to add your views into array. Have a single view controller, declare that array and all your views can access the view controller's array.

Michael
+1  A: 

try to save it to a class (singelton class) it will work....it will surely work if you transfer it to the delegate class....make an NSMutableArray object there and initialize it once in applicationDidFinishLaunching method and then make object of delegate class and transfer your values to it by addObject method.....

Ranjeet Sajwan