Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有两个日历,当我选择第一个日历值时,我的第二个日历将显示上一个日历值 +2 (即,当我从第一个日历中选择 2/07/2012 时,我的第二个日历将显示 4/07/2012)是有可能吗?
只需添加适当的秒数即可创建一个新日期:
NSDate *newDate = [selectedDate dateByAddingTimeInterval:60*60*24*2];
并将该日期用作新日历的基础。