Apologies
You must be signed in to watch this lesson.
Podcasts UITableViewController + UISearchController
Podcasts
As you can imagine, we'll need to start off our application by building out a list that will display the available Podcasts during the search process. Many developers will build out a stub of what this list will render first, and then move onto hooking up an external API to fill up the list with real data. Thus in this lesson, we will build out a simple list that contains fake data using a UITableViewController. Next, we'll wrap up this lesson by implementing a UISearchController for searching in the navigation area. This is a new feature of iOS 11 that has been implemented to accompany large titles. Super easy to setup so let's see how we can do this.

Comments (11)
Kilian Hiestermann
6 years ago
Good thing with the comments in the code!
Chard
6 years ago
how to make these icons :)haha
Brian Voong
6 years ago
Tube
6 years ago
You don't use Refactor / Extract Function?
Brian Voong
6 years ago
simran5590
6 years ago
Happy Chinese New Year Brian. Hope you have a great year filled with health, happiness and success.
Esat Kemal Ekren
6 years ago
When you'll the release next episode :) I can't wait :)
Brian Voong
6 years ago
Esat Kemal Ekren
6 years ago
Thank you so much =)
MaurixFx
6 years ago
Hello Brian, I have a question, there is a certain code that is only for IOS 11, as it can be done in order to adapt that effect of the searchbar for iOS 10? if #available(iOS 11.0, *) { navigationItem.searchController = searchController navigationItem.hidesSearchBarWhenScrolling = false } else { // Fallback on earlier versions }
Brian Voong
6 years ago
MaurixFx
6 years ago
Thanks Brian for the answer. I will try to add UISearchBar in the header of the table. I have another question, I have a problem with the navigation bar and I prefer distant titles, check the following image of the url, the tableview is not displayed correctly http://res.cloudinary.com/maurixfx/image/upload/v1519244323/Simulator_Screen_Shot_-_iPhone_SE_-_2018-02-21_at_17.10.12_frqter.png After moving the scroll of the tableview is displayed correctly, what will be my problem? http://res.cloudinary.com/maurixfx/image/upload/v1519244712/Simulator_Screen_Shot_-_iPhone_SE_-_2018-02-21_at_17.24.51_dtx2cp.png
MaurixFx
6 years ago
I solved the problem by removing the code override var prefersStatusBarHidden: Bool { return true } But I do not know if it will be a ios 11 bug
Tokyojogo
6 years ago
Hey brian, so glad that you're teaching how to organize the files properly. I have a question, in the dequeuereusablecell, why do you need to put "self" for the podcasts? Thanks.
Brian Voong
5 years ago
Prabhdeep Singh Randhawa
6 years ago
Hi brian, I implemented searchController for searching some data from api.everything went fine.the problem i m facing is when i press cancel or clear the search box the data still remains in tableviewcontroller.can u help me with that. Thanks
Brian Voong
6 years ago
Alex Alx
5 years ago
why is there no like button here ? :)
Dew Douglass
5 years ago
haha word
LaurieHouse
4 years ago
Hey Brian, How difficult would it be to implement a second search filter? If I wanted to search for podcast track name or track artist?
Brian Le
4 years ago
Brian, How do I put the search bar into the navigation bar on top?
HELP & SUPPORT