选择日历中的多个日期
答
为此,在本教程中tappedTile方法是使用的date.so选择选择一个数字,你需要做阵列,并添加所有的字符串日期。
使用这样
NSMutableArray *eventArray//your array for adding dates,make it propeerty and alloc it.
- (void)calendarView:(KLCalendarView *)calendarView tappedTile:(KLTile *)aTile{
int month;
month=[aTile.date monthOfYear];
int day;
day=[aTile.date dayOfMonth];
int year=[aTile.date yearOfCommonEra];
NSString *dateForCompare;
dateForCompare=[NSString stringWithFormat:@"%i/%i/%i",month,day,year];
[eventArray addObject:dateForCompare];
//use this array (having dates in string format).
// use this by using your logical capability
}
看到这个link,可能是它可以帮助你
感谢Ishu,但我无法改变tappedTile方法赶上一个以上的日期。请帮助我。 – Akshay 2011-02-28 06:58:22
你是什么意思通过改变tappedTile – Ishu 2011-02-28 07:14:20
我只是想获得数组或字符串中的多个日期。 因为我想将日期作为参数传递并从数据库中获取一些数据。但在这里,当我点击一个瓷砖时,一个日期会进入控制台。我想给用户选择多个日期的功能,并显示所有选定日期的报告。帮助需要 – Akshay 2011-02-28 07:18:29