I have a View Controller in which my value is 0 (label) and when I open that View Controller from another ViewController
I have set viewDidAppear
to set value 20 on label. It works fine but when I close my app and than again I open my app but the value doesn't change because viewDidLoad
, viewDidAppear
and viewWillAppear
nothing get called. How can I call when I open my app. Do I have to do anything from applicationDidBecomeActive
?
Ios – ViewDidAppear is not called when opening app from background
iosiphoneobjective cswiftxcode
Related Topic
- Ios – Why does viewWillAppear not get called when an app comes back from the background
- Ios – How to tell the active view controller when applicationDidBecomeActive is called
- Ios – viewDidAppear not getting called
- Ios – How to animate constraint changes
- Ios – UIScrollView Scrollable Content Size Ambiguity
- IOS app with framework crashed on device, dyld: Library not loaded, Xcode 6 Beta
- C# – Permissions problem when starting .NET app from .NET service as a different user
Best Answer
Curious about the exact sequence of events, I instrumented an app as follows: (@Zohaib, you can use the NSNotificationCenter code below to answer your question).
At launch, the output looks like this:
Enter the background then reenter the foreground: