/ios-home-vs-lock-button

Sample project that allows you to test if the app is entering the background because of a Home button press or Lock button press

Primary LanguageObjective-C

Detecting Home button vs Lock button - iOS 7

This project describes how to detect when a user presses the home button to leave your application and when they press the lock button to put your app into the background.

It utilizes CSNotificationCenter to detect Darwin notifications.

credit goes out to wqq on stackoverflow

You can find it in Stackoverflow