how easy to filter data by dates with uitableview

will like to know how easy to do the date change and get a new set of data for my tableview.

something like myfitnesspal app. any comments or web link to tutorial are very much appreciated.

thanks for reading

- (IBAction)previousDayButtonPressed:(id)sender
{
    [self changeCurrentDayBy:-1];

    [self.drinksTableView reloadData];
}

- (IBAction)nextDayButtonPressed:(id)sender
{
    [self changeCurrentDayBy:1];

    [self.drinksTableView reloadData];
}

- (void)changeCurrentDayBy:(NSInteger)numberOfDays
{

}

Answers


If you make each segmented controller a new query on your data it's easy to resort a tableView. It depends on how well your data is structured. See NSFetchRequest if your data is in CoreData or the NSArray class if your data is just held in dictionaries or arrays. There are built in SDK functions that let you organize and sort your tableView array's pretty easily.


Need Your Help

Image doesn't reflect automatically

c# javascript jquery asp.net-mvc kendo-asp.net-mvc

I am using Kendo.Upload for uploading image and temporrary view in IMG tag. It works great for chrome. But having issue in firefox and IE. In firefox, when i change src of IMG tag, i don't change i...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.