in ViewController
@IBOutlet weak var myDatePicker: UIDatePicker!
in AppDelegate
let a = ViewController()
func applicationWillResignActive(application: UIApplication) {
print(a.myDatePicker?.date)
}
I want to use the property myDatePicker.date
from ViewController
in AppDelegate.swift
but instance property value is nil
how do you access the real value in the ViewController
's myDatePicker.date
which user picked?