Apologies
You must be signed in to watch this lesson.
Showing Episodes Controller
Podcasts
With our Podcast Searching feature now mostly taken care of, it's time to move on by showing our Episodes Controller page whenever we select a Podcast. This is extremely easy and straightforward to implement in code by handling the didSelectRowAtIndexPath method for our table view. Once we get the implementation for this going, we will show a list of dummy episodes in our table view. In the next episode, we will look at parsing our episodes from the feedUrl stream in our iTunes Search API.

Comments (9)
Tube
6 years ago
Wow! These lessons are almost perfect. You have developed a great format. And, 20 minutes or less is a super length.
Dew Douglass
5 years ago
I have thought the same thing as well. It must take a lot of time to get these episodes smooth flowing.
Tokyojogo
6 years ago
Hi Brian, I noticed that when I do a search, i get so many errors - HTTP load failed (error code: -999 [1:89]). I'm not sure but I think its because as I type, its searching already and trying to download something but then I finalized the search term and hit enter it gets interrupted?
Brian Voong
6 years ago
Tokyojogo
6 years ago
it occurs while I'm typing in the search field.... I get a lot of that and I also see this: Failed to attach application protocol CFNetworkConnection in between those -999 errors as I am typing.
tinypixelpdx
6 years ago
I wasn't able to fix it but the digging around I did seems to say that the error is because we cancelled the downloading before the image has had a chance to complete. https://stackoverflow.com/questions/44397240/http-load-failed-error-code-999-189-for-task-in-ios-11?rq=1 I noticed that if I type "Brian Voong" quickly, while I'm typing the first name, I get those errors since some images weren't able to finish loading to completion, but if I typed it very slow and saw all the images load, there wouldn't be any errors below. Yet still not sure how to fix it.
jeffkral
6 years ago
Hey Brian, love the course. Would you consider the way you use didSet as an alternative data passing method to delegation? Or is it a completely different concept? Thanks!
aroland
5 years ago
Hey Brian, I wonder if there is any special reason to use "fileprivate" for "setupTableView()". I've seen that sometimes you use "fileprivate" and sometimes just "private". It confuses me :D
Dew Douglass
5 years ago
They basically do the same thing. Just know that fileprivate is less restrictive than private. If you were to declare two different classes within the same file, and one of those classes had a private variable, the other class cannot access it. However if that variable is filepivate, the other class can access it. Someone correct me if I'm wrong.
aroland
5 years ago
Thank you for your answer. I think I understand the difference between these two access modificators and you explained it exhaustively. But anyway I don't understand why use 'fileprivate' while there is only one class in the file. I see that Brian do that by default and he is not the only one. Xcode do the same after Refactor -> Extract method. I always thought that, by default, we should always use the most strict possible access modificator.
Dew Douglass
5 years ago
Thats a good question and maybe Brian will give us the answer for that or research why others do that. I do know that Brian will occasionally declare two different classes within the same file if they are related and the second class is just a few lines of code. So maybe he is opening up that possibility without having to go back and change the type from private to fileprivate in the future.
mohit1007
5 years ago
Hi Brian, Great series. I have a question.. I was wondering if I am the only one who is seeing this? When I search for something.. say "Brian Voong".. then the podcast shows up and everything is cool but for some reason, I feel the image is "cached". What i mean is that when i search for something else, the image is kinda still the one for "Brian Voong". I am wondering if that is something to expect at this point in time or maybe I missed something in the series so far?
Brian Voong
5 years ago
mohit1007
5 years ago
So for example.. search for "Brian Voong" and then "Coldplay"
mohit1007
5 years ago
ah awesome. thanks for prompt response. let me check
Kenneth Spry
5 years ago
I'm getting "Thread 1: SIGABRT" error when I add in the following line: navigationController?.pushViewController(episodesController, animated: true)
Kenneth Spry
5 years ago
Finally tracked it down. I was registering using UITableView.self instead of UITableViewCell.self
Prudhvi Gadiraju
5 years ago
Why not set tableView.separatorStyle = .none to get rid of the lines in the Table View
Brian Le
4 years ago
Brian - How would you go about showing or playing an episode, if the user decide to want to search for a specific episode vice podcast?
ttanew
3 years ago
Hello Brian, When I make fileprivate func setupTableView() { tableView.register(UITableViewCell.self, forCellReuseIdentifier: "Cell") tableView.tableFooterView = UIView() an error occured; 'unable to dequeue a cell with identifier cellId' so I did roll back like this override func viewDidLoad() { super.viewDidLoad() tableView.register(UITableViewCell.self, forCellReuseIdentifier: "Cell") tableView.tableFooterView = UIView() } How can I fix it?
Brian Voong
3 years ago
HELP & SUPPORT