Shifting the value one position down as the new value is added in tableview in iphone
friends,I am working with an app where i am populating tableview cells with an array and its getting populated fine,bu开发者_Python百科t it is following a standard pattern,the values are getting added in this positon pos0 pos1 pos2 pos3
but what i need is as when the first values is added ,it will obviously add to the first row at pos 0..but when next value is added i want that the new value should come at position 0 and the previous value should move to position 1..
so please help me out..
Thanks &Regards Ranjit
Your datasource
items at a particular index decide where the items come into the tableview. So if your datasource is an array then you can probably add item to it using
insertObject:atIndex
method. And then you can call the reload data on your tableview.
精彩评论