I have 2 view controllers, vc1 and vc2. A modal segue is invoked from vc1 when I want to load vc2. Say I background the app when vc2 is showing. Why isn’t viewDidAppear called when the app is re-opened to the view that was left off? How else am I able to detect every time vc2 appears?
Share
You could register for the
UIApplicationDidBecomeActiveNotificationin VC2 and callviewDidAppearfrom there. Do this in yourviewDidLoadof VC2:As rmaddy says below, make sure to remove the observer in dealloc or viewDidUnload.