---
title: "Why viewWillDisappear or viewDidDisappear not called when app quit in iOS simulator?"  
description: "Why viewWillDisappear or viewDidDisappear not called when app quit in iOS simulator?"  
author: "Sunil Singh"  
published: 2015-04-20  
updated: 2015-04-20  
canonical: https://www.mindstick.com/forum/23106/why-viewwilldisappear-or-viewdiddisappear-not-called-when-app-quit-in-ios-simulator  
category: "iphone"  
tags: ["iphone", "ios"]  
reading_time: 1 minute  

---

# Why viewWillDisappear or viewDidDisappear not called when app quit in iOS simulator?

I'm [trying](https://answers.mindstick.com/qa/93698/6-mistakes-couples-are-trying-to-save-money) to call removeObserver() when the app quits. But when I used NSLog() to [check](https://yourviews.mindstick.com/story/2248/never-forget-to-check-these-specifications-before-buying-a-mobile-phone), I found neither viewWillDisappear() nor viewDidDisappear() was called after the app quit in [iOS](https://www.mindstick.com/articles/12222/core-data-and-how-to-use-it-in-ios-objective-c) simulator. I'm using a single [view](https://yourviews.mindstick.com/view/84701/layoffs-in-google-india-2023-view) [template](https://www.mindstick.com/blog/282/creating-custom-template-in-joomla), not [navigation controller](https://www.mindstick.com/interview/22810/what-is-the-navigation-controller) in similar questions.

## Replies

### Reply by Jayden Bell

These two methods will not be called when you quit the app. Instead, the method you can use observer

\

```
 [[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(applicationDidEnterBackground:)name:UIApplicationDidEnterBackgroundNotification object:nil];(void)applicationDidEnterBackground:(NSNotification *)aNotification { // your  removeObserver code goes here.    NSLog(@"applicationDidEnterBackground");}
```


---

Original Source: https://www.mindstick.com/forum/23106/why-viewwilldisappear-or-viewdiddisappear-not-called-when-app-quit-in-ios-simulator

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
