Apologies
You must be signed in to watch this lesson.
User Details and Blur Effect View
Tinder Firestore Swipe and Match
In today's lesson, let's flesh out the User Details page with the rest of our UI components. Before doing any layout, let's first figure out how to send in the user from our click card through our previously created delegation method. We'll also look at how to easily setup a UIVisualEffectView with a UIBlurEffect. Enjoy.

Comments (7)
Anas Belkhadir
5 years ago
Thanks for you awesome Course . i will be very happy if you could add a bonus, how to do nice transition for UIViewController when the user click on the card how we can do the zoom in the photo, and present the details.
Brian Voong
5 years ago
Anas Belkhadir
5 years ago
I appreciate for you hard work thanks .
Hursh Hazari
5 years ago
Excellent course Brian!!! It would be extremely helpful if you can explain how to convert CardViewModel to UserDetailsViewModel when passing user data. Thanks
dclawson
5 years ago
Dumb question: if you were making a lot of buttons like this (the dismiss button), would it be good to create some kind of custom UIButton class? You could pass in an image and a string as parameters. The image would contain the button's image, and the string would be the function name for the touchupinside recognizer.
dclawson
5 years ago
Wow, I guess I should have watched the rest of the video. So, now that I've seen that way (using the createButton function), would there be a case for having the custom class? Seems like it could be useful throughout the app vs just the one UserDetailsController.
Brian Voong
5 years ago
Eugeneberezin
4 years ago
Hey Brian, I am trying to implement like and dislike functionality for this screen. I pretty much finished the app. So I am trying to use delegates and use handle like, but it's not working. Even if I dismiss user detail view first and end up in home controller it's not quite working. Maybe I am calling my delegate in the wrong place... I tried in handleLike and handleDislike methods. But... it's not quite working. Then on viewDidAppear the same.... Ant tips and ideas would be appreciated.
Greg Reda
4 years ago
Were you able to fix the lingering photo when swiping bug? For whatever reason when I updated to Xcode 11 the bug reappeared.
Brian Voong
4 years ago
antoinenei
4 years ago
If your buttons are stretched out, add this to your createButton method: button.imageView?.contentMode = .scaleAspectFit
antoinenei
4 years ago
Damn, just saw that Brian implements that in the video.... Never mind then
aymather
3 years ago
Ran into a super weird issue with `imageView.sd_setImage(with: <URL>)` not rendering. Just putting this here in case anybody else has the same issue. When I instantiated the `imageView` property I did it lazily like this: ``` lazy var imageView: UIImageView = { // The rest of my init code in here... }() ``` For some reason, when you lazily compute this image view, setting the image property within the "didSet" of the "cardViewModel" was not working. I tried image literals, doing it from a url with `.sd_setImage()` and nothing worked. All you need to do is not init your `imageView` lazily, so like this: ``` let imageView: UIImageView = { // The rest of my init code in here... }() ```
antoinenei
3 years ago
Hi Brian, thank you for the amazing course. Your enthusiasm is contagious :) I'm having an issue with the User Detail Description. When the user's name is very long, the name doesn't wrap to the next line. It keeps going and the view becomes horizontally scrollable. I set: infoLabel.numberOfLines = 0 and anchored infoLabel as you show in the video so I'm confused. Any help would be very appreciated! Thank you
Brian Voong
3 years ago
antoinenei
3 years ago
Hi Brian, thank you for your prompt response! Yes I am setting up the page like you. When I input names with several words and with many characters they don't wrap to the next line (I need this for my usecase). I setup the scroll view as so: lazy var scrollView: UIScrollView = { let sv = UIScrollView() sv.alwaysBounceVertical = true sv.contentInsetAdjustmentBehavior = .never sv.delegate = self return sv }() And add it to setupLayout() as so: view.addSubview(scrollView) scrollView.fillSuperview() I then add the infoLabel as a subview of scrollView, anchor it and set numberOfLines = 0. I'm pretty sure I replicated your code line by line. Thank you for your help!
HELP & SUPPORT