When an app goes into the background, I want to put a blur view in a xib file (so it can be customized) on top of my top view controller so that users can't see the content of my app when using multitasking. How would I do that? I tried a bunch of stuff with the root view controller but it didn't work. I know I need to use these delegate methods but I am not sure exactly how to get the top view controller and put a view on top of it. I am using tab bar controller with a bunch of navigation controllers.
func applicationWillResignActive(_ application: UIApplication) {
}
and
func applicationWillEnterForeground(_ application: UIApplication) {
}
When the app is opened again, I obviously want to get rid of that blur view but I would also like to use Face/Touch ID to give access. I assume this is pretty straight forward using LocalAuthentication.