I want viewController's method for update data.
So I want use viewController's update method when applicationDidBecomeActive(_ application: UIApplication).
how it possible?
I want viewController's method for update data.
So I want use viewController's update method when applicationDidBecomeActive(_ application: UIApplication).
how it possible?
Copyright © 2021 Jogjafile Inc.
This may help you (tested in Swift 4)
Note: Don't forget to remove observer when your view controller is no longer in use/memory (as this is an application level observer and will be called every time your application becomes active, whether your view controller is active or not.
Here is code to remove observer: