开发者

Iphone Tableview reaload data how to make the new data at the top rows of the tableview

i have decler an NSMutable Array and load data from it to my tableview but here the issue is that the new loaded data comes to the middle of tableview or at bottom but i want that it comes at the top rows when i reload data in tableview how its poss开发者_运维知识库ible if anyone can help me the i will be thankful to him/her;


It depends on the way you add objects in your array. For example: if your NSMutableArray is named source, if you call

[source addObject:@"New row"];

you'll find @"New Row" as last row in your table, while if you call

[source insertObject:@"New row" atIndex:0];

you'll find it as first row.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜