4 years ago

Generating unique ids through preprocessors

Some time ago I wanted to optionally include some code via a preprocessor command. Normally this is quite simple. For example, here is a common definition used to handling logged during development. #…

5 years ago

Detecting when iOS goes to sleep

In an app recently we wanted to know when the device went to sleep, as opposed to just went into the background. The reason was that the app needed to behave differently when it was opened again and t…