HI all,
i need to create an dynamic array, every time i add object,it should not overwrite the first element.It should keep inserting into it.
eventually i need to insert that elements from array into table view.
so from one view, user filling form first name,last name and hits enter.
these two values should be inserted into array.Which is shown in table view,at the very first row.
second user comes, he fills firstname lastname and hits enter, this two values also should be inserted into array ,and in tableview,it should occupy first position and the previous values should shifted to 1 row below,
i hope now i m more clear with my problem
regards
shishir
Check NSMutableArray.
Edit: There are 2 methods to insert an object into the front. The slow way is to use
this is slow because every time an object is added, N items will be moved. If the part is not the performance bottleneck, this method is recommended as code depending on it can be written more easily.
The fast way is add to the end using
-addObject:, but for rowi, you get the object at[arr count] - i - 1.