Swift: How to access in AppDelegate variable from the View controller?
问题 I would like to write in the text or csv (prefer) file the variable from the view controller. Indeed I am doing a drawing app and I would like to write in the file the current position of the finger. class ViewController: UIViewController {var lastPoint = CGPoint.zeroPoint ... } I would like to have access to lastPoint.x and lastPoint.y from the AppDelegate. how I could do that ? Thank you. 回答1: Your question is full of confusion but if that's what you are looking for: You can access the