I have 2 storyboards. I need to switch between them. The first storyboard has a map view controller. When I switch to the second storyboard, I change rootViewController, as below
let appDelegate = UIApplication.shared.delegate! as! AppDelegate
let storyboard = UIStoryboard(name: "LoginController", bundle: nil)
let viewController = storyboard.instantiateViewController(withIdentifier: "LoginController")
appDelegate.window?.rootViewController = viewController
appDelegate.window?.makeKeyAndVisible()
But when I open the first storyboard I see all annotations as earlier. How can I remove cache from map?