func applicationWillEnterForeground(_ application: UIApplication) {
// Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
let myTabBar = self.window?.rootViewController as! UITabBarController //Getting the tabbar
myTabBar.selectedIndex = 0 //select the tab, 0,1,2,3,etc
let tmpVC = myTabBar.selectedViewController as! ViewController
tmpVC.functionToCall()
}