How do I send a NSDate
object to another view?
Trying to get the selected date form a calendar (Si-Calendar) and use it into another view...
How do I send a NSDate
object to another view?
Trying to get the selected date form a calendar (Si-Calendar) and use it into another view...
Looking at the README file on GitHub, changes in the selected date will be sent to the object you set as delegate for the CalendarViewController object. The method that will be called is:
If you then want to pass that date on to a new viewController, make sure it has an
NSDate
property, let's say it goes by the name date. You can then pass the date to the other viewController (let's say it's called otherViewController) this way:This is a normal way of passing objects through viewControllers, you'd do it like this for any type of object. The basic idiom is:
retain
orstrong
keyword, it'll be retained.That's all! Hope this helps
anoterView.date = myDate;