A simple protocol-based example to cover up sensitive data in your app.
This example follows Sean Berry's article on medium.com
It also uses Apple's Technical Q&A QA1838 article as a reference.
Apple also provides an example in the Technical Q&A QA1838 article, mentioned above, that most apps follow.
I personally prefer Sean's approach in this regard.
When an app goes into background, you can see a snapshot of it in the recent-apps list, upon pressing the home button twice on an iOS device.
This example shows you how you could protect your user's data from being viewed when the app is in the background.
Main window
Background
Foreground
App icon: Icon made by xnimrodx from www.flaticon.com . It can be found here