UISearchController not dismissed when View is pushed UISearchController not dismissed when View is pushed swift swift

UISearchController not dismissed when View is pushed


I have the same exact issue, I have solved it by setting:

self.definesPresentationContext = YES;

on the view controller that presents the UISearchController. This is recommended by Apple in WWDC session 228, read about it here: http://asciiwwdc.com/2014/sessions/228.