User Search Controller
Instagram Firebase
Our world is currently quite empty because we don't have any way of searching for users in the application. In this lesson, let's go ahead and create a few additional users in our system. Next, we'll set up the search screen that allows easy filtering of users based on the text input in the navigational search bar.

Comments (14)
yannsonnboys
6 years ago
Hey amazing video part 23. I was wondering if you can also integrate two other option? Like - people can post picture of video. - people can make a Hashtag (#). those option will be great
tomxue
6 years ago
Why does the separator view only show up when the user drags the display?
Brian Voong
6 years ago
eilufoye
6 years ago
Hey Brian, I reviewed major company's app and I discovered most of them do not display their database master list prior to searching. if the app is going to be launched and there will be thousand of users, do you still recommend displaying the master list?
Brian Voong
6 years ago
Paradox_Gods
6 years ago
Hey Brian, wouldn't it be better to instead replace the titleView with the searchBar? As it saves having to hide the search bar, i also noticed some weird bugs when sliding to navigate back and cancelling. This also makes the animation for the search bar coming back in look smoother. navigationItem.titleView = searchBar
Jesus Miguel Rosado Perdomo
6 years ago
Hey Brian hope all is good just a quick question, how can we send and accept friend request? Thanks
stevezhou
5 years ago
In ios11, how do you set the default search icon and the text in the middle of the search bar? It no longer appears in the middle by default.
Brian Voong
5 years ago
Aurélien Haie
5 years ago
Maybe there was an update with the iOS 11, but the searchBar doesn't show up if I add it to the navigationController.navigationBar. I just wrote this line of code : navigationItem.titleView = searchBar And it perfectly fit, no need to anchor..
Brian Voong
5 years ago
dubbasar
5 years ago
Good one!
tetraprism95
5 years ago
Hey Brian, It may only be for this course, but can we use UITableViewController/ Cell in replacement of UICollectionViewController/ Cell for future projects? I'm asking due to the reason for example, the UserSearchController and the HomeController, have the capabilities of being a tableController as well . But I'm assuming if we did in fact use UITableViewController for those it would mess it up because of the MainTabBarController class where we already set everything to UICollectionView. So what I'm asking is, can we just forget about tableControllers in general and just utilize UICollectionView only for all my future projects? I'm assuming that's bad because each Controllers has its own flexibilities but I'm confused when and how I should use one for the other.
tetraprism95
5 years ago
EDIT: I mean can we use UICollectionViewController/ Cell in replacement of UITableViewController/ Cell
Brian Voong
5 years ago
rickkettner
5 years ago
Brian, what's the advantage of using a UICollectionViewController rather than a UITableViewController for this lesson? At first glance it seems this UI is a perfect use case for UITableViewControllers. Do UICollectionViewControllers have the equivalent of a UITableViewRowAction feature?
Brian Voong
5 years ago
XIAOYIJ1999
5 years ago
Hey Brian, Quick question. What you prefer to use UICollectionView. What is the different between using UICollectionView and using UITableView for the HomeController. By the way, great video. I have learned a lot!!!
Brian Voong
5 years ago
VarunRustomji
4 years ago
Hey Brian, I noticed that for all the controllers like HomeController or UserSearchController classes are primarily inheriting UICollectionViewController. How would the code change if my UserSearchController was inheriting from UIViewController instead? I tried something like this : let cameraNavController = templateNavController(unselectedImage: #imageLiteral(resourceName: "camera_unselected"), selectedImage: #imageLiteral(resourceName: "camera_selected"), rootViewController: CameraController(collectionView: UICollectionView())) but it doesn't seem to work.. The code in my CameraController is as follows: import UIKit class CameraController: UIViewController { override func viewDidLoad() { super.viewDidLoad() } }
Brian Voong
4 years ago
VarunRustomji
4 years ago
The error I'm getting is "Incorrect label in call" and the fix recommended is to change collectionView to coder and after doing that I get an error saying can not convert value of type 'UICollectionView' to expected argument type 'NSCoder'.
VarunRustomji
4 years ago
In order to fix this what I tried to do was use index that we use to set photoSelectorController and that seems to work the way I expect it to. The only issue I'm now having is that dismiss is not taking me back to home... The code I am using is : let cameraController = CameraController() let navController = UINavigationController(rootViewController: cameraController) present(navController, animated: true, completion: nil) My code in cameraController is as follows : class CameraController: UIViewController { let dismissButton: UIButton = { let button = UIButton(type: .system) button.setImage("right_arrow_shadow"), for: .normal) button.addTarget(self, action: #selector(handleDismiss), for: .touchUpInside) return button }() @objc func handleDismiss() { dismiss(animated: true, completion: nil) } override func viewDidLoad() { super.viewDidLoad() navigationController?.setNavigationBarHidden(true, animated: true) view.addSubview(dismissButton) dismissButton.anchor(top: view.topAnchor, left: nil, bottom: nil, right: view.rightAnchor, paddingTop: 12, paddingLeft: 0, paddingBottom: 0, paddingRight: 12, width: 50, height: 50) } } Instead of moving back to the home tab it stays on the camera tab but only makes the tab bar, nav bar visible and sets a black background... Basically what I am trying to do is implement your CameraController class (video 29) but make it appear from the tab bar instead of the nav bar.
Clint Larenz Nurse
4 years ago
Is there a way to implement a feature similar to instagrams, using the search bar as a button too navigation to a search controller view? Then implementing your search function code?
Clint Larenz Nurse
4 years ago
Never mind, figured it out.
HappyCow
3 years ago
Brian, since I got to lesson 23, the video quality has diminished to 360p and watching the videos at that resolution is giving me headaches. I tried logging out and in. I tried connecting with different internet connections. None of these solutions are helping improve the resolution. What can I do?
Brian Voong
3 years ago
bscolieri
2 years ago
Hey Brian! I've been trying to implement full-text search (which has proven painful). So far I have looked into Elastic Cloud (a managed elasticsearch solution on GCP) and Algolia. Do you have any suggestions for tutorials that would be congruent with this course's structure and give a detailed walk through? At this point, I would have been happy to pay double or even triple for this course if it had a walkthrough of full-text search. If you get around to it, ANY help/guidance whatsoever would be very much appreciated. Thanks :)
HELP & SUPPORT