I have added a child UIViewController's view to a UIViewController on the storyboard from code instead of using segue. The custom UIViewController contains UISearchController. Following is the code I am using for adding the custom/child UIViewController:
self.customController = [[CustomUIViewController alloc] init];
[self.searchBarContainerView addSubview:self.customController.view];
'self.searchBarContainerView' in the above code is an UIView for displaying search bar of UISearchController. This code is working fine and the search bar is shown without issues at runtime. However when I am clicking inside search bar, following warning message is logged in the output window
"presenting view controllers on detached view controllers is discouraged "
I need help is fixing this warning from being shown.