Sort items in a table view in iphone
I am developing an application in which i am displaying the result of web service in table view, now i want to display according to the selection. for example. there are certain items such as price, description, title.开发者_高级运维 now if i want to display all the result according to price how should i display. I have used XML parsing to display the result in table view.
Please give me the proper solution for this. Awaiting for your positive reply.
Create an NSSortDescriptor
for each way you want to sort the data in the tableview
. Each time your choose a different way to sort, your datasource is going to have to refresh.
More details here as this questions has been answered many times.
精彩评论