开发者

Shifting the value one position down as the new value is added in tableview in iphone

开发者 https://www.devze.com 2023-03-26 16:32 出处:网络
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 aregetting added

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消