Some new things to remember for my future self :
Dear Us,
If you try to use UISearchController on iOS 12 please remember those few bug fixes :
1. If your UISearchBar uses keyboardAppearance = .dark it wil override your SearchResultsViewController.traitCollection.userInterfaceStyle. Use this extension to fix it, because iOS 12 think it knows about interface styles, but does it really ?
2. If your searchBar & navigationBar disappear after typing some text in the searchBar, you should check that `SearchController.definesPresentationContext` is set to true, but also that `SearchResultsViewController.edgesForExtendedLayout` is set to []. Trust me
The first one is because SearchController is dark magic and needs to be allowed to do loads of weird things (yes you guessed right, I& #39;m still not sure what really happens). The second is because your SearchResultsVC.tableView is contrained to your vc.view& #39;s top and will try to
use as much space as it can. Tell them to calm down, they& #39;re really nice, they& #39;ll listen, what do you know you may even be friends some day
3. If you need to push some viewController on your navigation stack, do it right. Or at least do it this way. Ask the searchController do hide, so that it hides the resultsVC too, push your new view. When your user will go back I promise the searchVC will reappear (I asked, they
don& #39;t really know why either) and all will be good. Your user& #39;s flow won& #39;t be interrupted I swear.

Anyway, week 3 of being alone, sorry for being weird Me. Take care of you https://abs.twimg.com/emoji/v2/... draggable="false" alt="💖" title="Sparkling heart" aria-label="Emoji: Sparkling heart">
You can follow @syan_me.
Tip: mention @twtextapp on a Twitter thread with the keyword “unroll” to get a link to it.

Latest Threads Unrolled: