I have attempted this is many ways but failed consistently, hopefully you guys can help me achieve the what i want to do.
I am making an iPad app, I will have five tables in a single view and each table will have a date as a header/title in this format, e.g. Monday 20
These five tables will be monday to friday. This is the bit I cant do. I want to work out the current date and then highlight the table which is today, obviously changes everyday.
So for example, lets say today is Thursday 9th. Thursday table is highlighted and then is automatically sets the date of the other tables around thursday.
Think of a school timetable/planner/diary. Monday to friday, each labelled with their dates.
EDIT: So what if I did it like this? If I add this into the code you gave me, if TRUE (button pressed) add seven days, done just like in the example form Apple. However my issue, what is gregorian? what do I replace it with? I have seen it used lots on calendar samples from Apple.
if (tableView == monTable){
if(next == TRUE){
[comps setDay:7];
NSDate *date = [gregorian dateByAddingComponents:comps toDate:curDate options:0];
}
else{
[comps setWeekday:2];
}
}