This is my first application for iOS.
So I have a UIVIewController with a UITableView where I have integrated a UISearchBar and a
UIVIewController
UITableView
UISearchBar
In my case, I found my code to present the new viewController (a UIAlertController) was being called twice.
UIAlertController
Check this before messing about with definesPresentationContext.
definesPresentationContext