Swift 4.2 Stretchy Header Collection View Cells / Header / Padding (Ep 1)

  Рет қаралды 56,569

Lets Build That App

Lets Build That App

Күн бұрын

Пікірлер: 144
@vandanpatel3395
@vandanpatel3395 6 жыл бұрын
Hi Brian, I really love how you start with an empty Xcode project, I personally feel good when I start from scratch and have a completed version at the end. I have noticed that there aren't a lot of people out there who starts a complicated project like this from scratch & break it down into multiple videos with a perfect pace. Thanks!
@LetsBuildThatApp
@LetsBuildThatApp 6 жыл бұрын
Indeed, projects are much easier to follow when we start from scratch and don't assume any knowledge from the beginning.
@Omeir34
@Omeir34 6 жыл бұрын
Finally a Brian video! Been waiting for a month.
@samtr4439
@samtr4439 6 жыл бұрын
a big Christmas gift, thanks Brain
@marklopez4354
@marklopez4354 6 жыл бұрын
Thanks for what you do man. Keep it up. These are so informative and the delivery is great to listen to. Thanks for putting in the time and effort to do this work a couple days before Christmas. This tutorial helped me out a ton, just at the right time. Cheers.
@nikolaisd
@nikolaisd 5 жыл бұрын
Another great tutorial by Brian.
@KevinChromik
@KevinChromik 6 жыл бұрын
Hi Brian, thanks a lot for your amazing content. You inspired me a year ago to start with my own Swift/iOS KZbin Channel for German speakers :) Still a small channel, though.
@abdouett3676
@abdouett3676 6 жыл бұрын
Great work Brian! We are awaiting for the next part. Thanks
@LetsBuildThatApp
@LetsBuildThatApp 6 жыл бұрын
Already queued up part 2 for Tuesday. Nice change in profile avatar :)
@abdouett3676
@abdouett3676 6 жыл бұрын
@@LetsBuildThatApp Thank you :)
@magic0x0
@magic0x0 6 жыл бұрын
Best teacher ever👌🏻
@JunaidKhan-ny8tu
@JunaidKhan-ny8tu 6 жыл бұрын
waiting for episode 2 , waited a lot for this man
@phanirithvij
@phanirithvij 6 жыл бұрын
I don't have a MAC but I did watch the whole video for some reason. And liked it.
@김동준-j9m
@김동준-j9m 5 жыл бұрын
You saved my life Brian!!! I love you
@RyuuzakiJulio
@RyuuzakiJulio 6 жыл бұрын
Damn. This should be called “not just another noob swift tutorial” really good content.
@osmanmusse6223
@osmanmusse6223 5 жыл бұрын
Cool video Brian best swift teacher
@mrarronst
@mrarronst 5 жыл бұрын
Thank you Brian. You've earned another subscriber. Good Job 👍
@justinblackvfx
@justinblackvfx 6 жыл бұрын
It's such a coincidence that Brian make this tutorial, I have trouble how to make my ImageView in header hugging into the notch. Thank you for your tutorial brian
@ecptavares
@ecptavares 6 жыл бұрын
For those of you whom are following along like me and are having problems trying to change the status bar color to lightContent and are having problems don't forget to set in your application's Info.plist, "View controller-based status bar appearance" to YES.
@Omeir34
@Omeir34 6 жыл бұрын
or in viewDidLoad you could say: navigationController?.navigationBar.barStyle = .black
@pkthehulk
@pkthehulk 5 жыл бұрын
Hi Brian. Your videos are awesome. Thanks.
@vectorchange2354
@vectorchange2354 6 жыл бұрын
can't wait for part 2 already! Love the different approach compared to the tinder one
@Dennisvm82
@Dennisvm82 6 жыл бұрын
Nice update, Brian. I believe we did the same thing in the Tinder course :-) so I guess I already know how you will tackle the drag + blur functionality. Nevertheless, looking forward to doing it again in a more straightforward approach. Thanks!
@LetsBuildThatApp
@LetsBuildThatApp 6 жыл бұрын
We’ll be using a custom flow layout which is somewhat more complicated but overall provides a much more maintainable solution. Hope you enjoy the next episode on Tuesday.
@nomanzafar2099
@nomanzafar2099 6 жыл бұрын
First viewer of new series.😍😎
@tonywang6683
@tonywang6683 5 жыл бұрын
Awesome tutorials. Thank you!!!!
@jonedoe2163
@jonedoe2163 6 жыл бұрын
Thank you so much Brian! Merry Christmas!
@kevinvu2093
@kevinvu2093 6 жыл бұрын
Merry Christmas!
@LetsBuildThatApp
@LetsBuildThatApp 6 жыл бұрын
Happy Holidays sir.
@Hanryjohn18
@Hanryjohn18 6 жыл бұрын
Such a great tutorial ever ! I've learnt a lot from you, Brian . Thank you so much !
@habibdurodola5728
@habibdurodola5728 4 жыл бұрын
Amazing content
@mattheaney729
@mattheaney729 6 жыл бұрын
Great video, I’m looking forward to part 2 😁
@georgemujuru1232
@georgemujuru1232 6 жыл бұрын
Give that man a Bells.
@nizz4m
@nizz4m 6 жыл бұрын
You also have a good editing skills 👍👍
@30guarino
@30guarino 6 жыл бұрын
Thanks for the tutorial and Merry Christmas!
@MohammadImranimufun
@MohammadImranimufun 6 жыл бұрын
Awesome! Finally :)
@TheYotacz
@TheYotacz 6 жыл бұрын
Thank you for the lecture! MC!!
@JohanAlbrectsen
@JohanAlbrectsen 6 жыл бұрын
I’ve needed this for so long!!!! Thanks Brian!!!!
@AdelUI
@AdelUI 3 жыл бұрын
First of all thanx for amazing video,... now can i setup minimum height ?!
@elevun
@elevun 6 жыл бұрын
Great tutorial! When will episode 2 be up?
@LetsBuildThatApp
@LetsBuildThatApp 6 жыл бұрын
Queued for Tuesday
@alextsai3003
@alextsai3003 6 жыл бұрын
Excuse me!! Why you didn't type "window?.makeKeyAndVisible()" , then you could show the yellow screen on it. But I need to type it , then I just can see the yellow screen? About at 7:00
@GoingWalkabout
@GoingWalkabout 5 жыл бұрын
Thx, very helpful and useful
@BBorn223
@BBorn223 5 жыл бұрын
Tried to follow the example. Get stuck at 9:18. I can't see my cells even though already make it as black. I don't know where did I go wrong. I have followed every word exactly as you typed it.
@BBorn223
@BBorn223 5 жыл бұрын
For anyone who are having the same problem, we need to set the layout at didFinishLaunchingWithOptions. we can do it like this window = UIWindow() let layout = UICollectionViewFlowLayout() layout.sectionInset = UIEdgeInsets(top: 20, left: 10, bottom: 10, right: 10) window?.rootViewController = StretchyHeaderController(collectionViewLayout: layout) Best of luck!
@LetsBuildThatApp
@LetsBuildThatApp 5 жыл бұрын
The layout code is also shown in the video if you need it.
@BBorn223
@BBorn223 5 жыл бұрын
@@LetsBuildThatApp thanks for the reply yes, I tried to type in window?.rootViewController = StretchyHeaderController(collectionViewLayout: UICollectionViewFlowLayout()), but it won't show my little cells. So I tried to search for solutions on stackoverflow*com and it said I need to put some insets. Great tutorials btw, catching up to you on many videos. Love the use of generics. thanks for sharing
@josemadrid8289
@josemadrid8289 6 жыл бұрын
You're good! Thank you.
@arcpull5879
@arcpull5879 6 жыл бұрын
LET'S GO!
@picy1
@picy1 6 жыл бұрын
Do we no longer have to call window.makeKeyAndVisible method in app delegate? This is a great video, thanks Brian!
@picy1
@picy1 6 жыл бұрын
Oh, it seems like if you delete the story board you have to call it
@askdetanny8915
@askdetanny8915 6 жыл бұрын
Sir can we build this type of anim in kotlin??
@aliquewilliams3080
@aliquewilliams3080 6 жыл бұрын
Is it weird that I click like on your videos before even watching them?
@SudhanshuSrivastavaIndia
@SudhanshuSrivastavaIndia 6 жыл бұрын
Count me too ;)
@ikechukwumichael1383
@ikechukwumichael1383 6 жыл бұрын
I just did same too. lol@@SudhanshuSrivastavaIndia
@dixiao8373
@dixiao8373 6 жыл бұрын
新年快乐
@LetsBuildThatApp
@LetsBuildThatApp 6 жыл бұрын
谢啦
@PS-dp8yg
@PS-dp8yg 6 жыл бұрын
Hi Brian, awesome tutorial! I was looking at your website, and I was wondering what is your order of iOS videos from beginners to advance. Thanks!
@Zakawaka45
@Zakawaka45 5 жыл бұрын
Can anyone tell me what software is being used to draw the arrows at 1:25?
@LetsBuildThatApp
@LetsBuildThatApp 5 жыл бұрын
It’s called PMouse
@Zakawaka45
@Zakawaka45 5 жыл бұрын
@@LetsBuildThatApp thanks man!
@sumandevulapalli7042
@sumandevulapalli7042 6 жыл бұрын
Thanks
@kidrainen01
@kidrainen01 5 жыл бұрын
Will you create a storyboard version of this?
@henrikknudsen8485
@henrikknudsen8485 3 жыл бұрын
I cant get the window to change its root VC as you explained
@dhruvpatel270
@dhruvpatel270 6 жыл бұрын
GREAT !!!!
@arifinfirdaus7379
@arifinfirdaus7379 6 жыл бұрын
Thanks for the video! how about if I want to use a transparent navigation bar? It should be hide when the ViewController is not scrolling and should be reappear when the scroll position hits the CollectionViewCell. Any Ideas?
@JulianoVincedeCampos
@JulianoVincedeCampos 5 жыл бұрын
Hi Brian, how are you? I'm Brazilian (Excuse my English), congratulations on being such an amazing person! Why not use StoryBoard, did you already say that in some video?
@rafatwasef8518
@rafatwasef8518 5 жыл бұрын
Hello, I have question with regard swift 4 If pickerdata = (“Numbers”, “Cars”, “Aircraft”) I need if I did search in this array with sub string such as Just “Air” Can I get the pickerdata index of “Aircraft” as the closest string. Please advise me how to do it. Display the pickerdata by just search by sub string Thank you Rafat
@takasurazeem
@takasurazeem 3 жыл бұрын
What is the name of the annotation tool you used?
@creanomy5381
@creanomy5381 6 жыл бұрын
Hi Brian, one more great video ! I was used to display UICollectionVC into a classic UIVC but your method to have your UICollectionVC in front is awesome. I have one question : As I'd like to instantiate my UICollectionVC not as a root controller, could you tell me how you would initialize it with a layout parameter ? thx !
@creanomy5381
@creanomy5381 6 жыл бұрын
I mean instantiate it in another way than with a UIVC, UICollectionViewDataSource, UICollectionViewDelegateFlowLayout class with a CollectionView as a subview...
@LetsBuildThatApp
@LetsBuildThatApp 6 жыл бұрын
I have no idea what you mean.
@creanomy5381
@creanomy5381 6 жыл бұрын
I mean that, in my case, the UIcollectionView I used is not my rootViewController. And as you show at 6:38, you can not initialize with a non-nil layout parameter. So I was wondering if there is another way to do it. Personnaly, I initialized like this : class "MyStretchyVC": UIViewController, UICollectionViewDataSource, UICollectionViewDelegateFlowLayout {.... and my Layout as a classical let in my viewDidLoad: let layout: UICollectionViewFlowLayout = HeaderLayout() it just works, but I wanted to ask you if you would have done it differently if your UICollectionView were not your RootVC.
@jfr5122
@jfr5122 6 жыл бұрын
Cool hat.
@smackaroony
@smackaroony 6 жыл бұрын
Whalecom back
@SACHINPATIL-wq3bg
@SACHINPATIL-wq3bg 5 жыл бұрын
vry useful bro, thank u !! :)
@nitinchadha16
@nitinchadha16 6 жыл бұрын
Is there any reason for using collectionview not tableview ?
@shaqnoor5187
@shaqnoor5187 5 жыл бұрын
Great video Brian ! not sure where I've messed up but when I put in my header it appears next to my UICollectionView cells (on the left) rather than on top of them? any idea?
@MH_Studio_
@MH_Studio_ 6 жыл бұрын
Thanks ^^
@neidjwojeuxiwiwoxk
@neidjwojeuxiwiwoxk 5 жыл бұрын
Thanks for those great videos!! I have one question in this video for those kind of cells is there a special reason why you would use a UICollectionView instead of a UITableView(which could be another choice)? I know what kind of pros and cons those two have but I still can't really "judge" in certain situations which would be the best. Thanks.
@LetsBuildThatApp
@LetsBuildThatApp 5 жыл бұрын
Yes, the easy answer is to try to do this and see if you can replicate it using a UITableView.
@neidjwojeuxiwiwoxk
@neidjwojeuxiwiwoxk 5 жыл бұрын
@@LetsBuildThatApp Thanks I will try it right now!
@maxcodes
@maxcodes 5 жыл бұрын
Haha solid video & I love the, lets call it, “content awareness strategy” for your courses.
@EmanNollase
@EmanNollase 5 жыл бұрын
Another question though, is there a way to wrap the images(png) that spaces around the contents of the image? e.g. the is basically contain text and for no apparent reason the images has spaces between them and cannot anymore ask the graphic designer to fix it up. thanks a lot
@gordonsmith6326
@gordonsmith6326 5 жыл бұрын
Great work Brian, is it possible to achieve this with horizontal scrolling? So a fixed header with the cells scrolling left to right, rather than up and down? I have tried adjusting the scroll direction but now the header is essentially full screen.
@LetsBuildThatApp
@LetsBuildThatApp 5 жыл бұрын
Never really seen a left to right stretchy header before. You’ll need to adjust the calculations to perform the appropriate horizontal stretching instead of vertical. Sounds fun.
@niteshkumar2133
@niteshkumar2133 5 жыл бұрын
Hi , I need cell into 15 X 15 format(scrolling with horizontal and vertical). How to achieve this design.
@TheRealWilcox
@TheRealWilcox 5 жыл бұрын
Hey Brian, what if I don’t want the stretchy header to be the main vc? Say I want to go there by clicking the profile button instead do I still need to initialize in appdelgate?
@nexreon
@nexreon 6 жыл бұрын
Thanks a lot! Could you please provide a link to github or any other place with final code?
@josephbouhanef3904
@josephbouhanef3904 4 жыл бұрын
How would I go if I wanted to implement an imgage from an API via a Url instead of an image literal?
@abhaydespande
@abhaydespande 4 жыл бұрын
Hi, I have a scenario where my first cell should overlap half of it’s content to a headerview inside a tableview, could you suggest best option?
@PtolemysEye
@PtolemysEye 6 жыл бұрын
If i'm not mistaken, you can simply use the 'insetsForSectionAt' function to return UIEdgeInsets instead of manipulating the layout correct?
@LetsBuildThatApp
@LetsBuildThatApp 6 жыл бұрын
You can use either one, depending on which is easier for you.
@VincentBouvier1
@VincentBouvier1 5 жыл бұрын
Thank you for this detailed tutorial. I was wondering why don't you use storyboard instead of doing everything programmatically. I believe some stuffs (not everything) can be made more easily from storyboard. Is there any reason for this ? I watched some of your videos and you always proceed the same way. This is no critic, I was actually wondering ;) One great thing is that you explain all the mechanism of UICollectionView through programmatic example. Again thanks for these amazing tutorial. ;)
@zackgib
@zackgib 5 жыл бұрын
I build my UI programmatically in code too. For me it’s simpler and faster to write the code all in one place and not have to mess with all the different stuff in Interface Builder.
@raygrant9673
@raygrant9673 5 жыл бұрын
Would this project be possible to use a UITableViewController instead of a UICollectionViewController?
@LetsBuildThatApp
@LetsBuildThatApp 5 жыл бұрын
Give it a try and see what happens good sir.
@kidrainen01
@kidrainen01 5 жыл бұрын
Is it possible to render out a collection view header from storyboard? It’s pretty easy to implement the view and unimage into a table view. To make a stretchy header for a collection view so i actually have to add a section header then place the view and imageview inside that? For a table view I just place the view a little above the table view cell.
@LetsBuildThatApp
@LetsBuildThatApp 5 жыл бұрын
As long as you use this custom layout you don’t need to change anything
@kidrainen01
@kidrainen01 5 жыл бұрын
Lets Build That App Thanks for your response. I guess I’m just so use to visually seeing my work in the storyboard. It’ll be an adjustment not being able to physically see my label, font size, etc in the storyboard but it’s also good for me to get use to doing more coding work in the view controller. Can you point me in the right direction how to add the effect when I scroll up the label in the stretchy header fades and is placed in the Nav Bar up top. ( Just like how Spotify does it)?
@EmanNollase
@EmanNollase 5 жыл бұрын
hi Brian, I am a fan of yours as i start my iOS developer journey. I have a question though. I am building an exam app. The data is coming from the server. Now the question and answers are all images, because it is a mathematical equations. My problem first problem is, the uicollectionviewcell is not resizing according to the image i loaded from the server. basically, how to achieve the automatic adjustment of uicollectionviewcell base on the contents, text and images? I already watch your tutorials about self-sizing cell but mostly text and you have done a much calculation. Is there a way or a component that can auto adjust the height of the cell base on the contents?
@football1606
@football1606 5 жыл бұрын
Where did you get the extension from?
@LetsBuildThatApp
@LetsBuildThatApp 5 жыл бұрын
I wrote it.
@football1606
@football1606 5 жыл бұрын
@@LetsBuildThatApp Oh wow! That's quite neat
@BillySangster
@BillySangster 5 жыл бұрын
Excellent video, thanks! A problem I'm finding, however, is that if I replace the UIImageView with any other view, say a UIStackView, UILabel, or even just a UIView, the constraints don't set. It's as if the superview doesn't exist. Any idea as to why this might be?
@LetsBuildThatApp
@LetsBuildThatApp 5 жыл бұрын
You have to call addsubview
@BillySangster
@BillySangster 5 жыл бұрын
I changed the addSubview(imageView) to addSubview(label) or addSubview(myView) or addSubview(stackView) depending on what I'd instantiated, but it makes no difference. It only seems to work with a UIImageView. @@LetsBuildThatApp
@BillySangster
@BillySangster 5 жыл бұрын
Right, I extracted the addSubview() call from the init and put it in another function, called from init. That works now, but I'm not exactly sure why.
@LetsBuildThatApp
@LetsBuildThatApp 5 жыл бұрын
Yeah sounds weird, if you want to post the header code in a gist I can see what's the problem.
@BillySangster
@BillySangster 5 жыл бұрын
Never used a Gist before - what a great idea. Link to the Gist (hope this works): gist.github.com/BillySangster/24f5db8ccec9cd292c2b9ec016e9c824@@LetsBuildThatApp
@eviltom1052
@eviltom1052 6 жыл бұрын
Merry Christmas Brian. One question! Can you give me a reason why you prefer using UICollectionView instead of UITableView? I hope I’m not assuming this but I see that you mostly prefer UICollectionView where you could have gotten away with UITableView.
@LetsBuildThatApp
@LetsBuildThatApp 6 жыл бұрын
I’ve tried many times to achieve a sticky header with a table view but was unsuccessful without using hacks.
@misscelebritymix
@misscelebritymix 5 жыл бұрын
can you tell me how to increase the hight of the navigation bar? every thing i tried didnt work
@LetsBuildThatApp
@LetsBuildThatApp 5 жыл бұрын
There is no navigation bar....
@misscelebritymix
@misscelebritymix 5 жыл бұрын
@@LetsBuildThatApp i know, but with my version i Enabled the navigation view. but the height is too small, i want to increase the navigation height but cant seem to override the navigation view to increase the height. would you happen to know how i can accomplish this?
@akashsrivastava5963
@akashsrivastava5963 6 жыл бұрын
Hey can you help me out with a touchID and a faceID tutorial? That would be very helpful Thanks.
@zoganauiti
@zoganauiti 6 жыл бұрын
why not using a table view?
@LetsBuildThatApp
@LetsBuildThatApp 6 жыл бұрын
Can you achieve a stretchy header with table view?
@zoganauiti
@zoganauiti 6 жыл бұрын
Lets Build That App I don’t know I didn’t know how to do with collection view either
@zoganauiti
@zoganauiti 6 жыл бұрын
Isn’t it possible to do with the sections of a table view ?
@NaridNGhost
@NaridNGhost 6 жыл бұрын
Lets Build That App github.com/apping/APParallaxHeader Thank you for your content. Amazing job!!
@NaridNGhost
@NaridNGhost 6 жыл бұрын
​@@LetsBuildThatApp I've tried with table view and I think it's ok. ¿Do you think my code is good enough? Thank you! bitbucket.org/snippets/diegobas/bejBe7/uitableview-with-stretchy-header
@feysalibrahim9556
@feysalibrahim9556 5 жыл бұрын
I love you
@hanharry5975
@hanharry5975 5 жыл бұрын
i am willing to pay for paid course in youtube not in LBTA website :-)
@ZmissterioZ
@ZmissterioZ 5 жыл бұрын
You should change your channel name to "Lets Build That guy" LOL
@amreladawy3784
@amreladawy3784 6 жыл бұрын
I was expecting to jump ahead and use LBTA to speed up.
@kristofferkokus6774
@kristofferkokus6774 5 жыл бұрын
Why are you always using the collectionView? Couldnt you just have used a table view? Also refering to your other videos...
@LetsBuildThatApp
@LetsBuildThatApp 5 жыл бұрын
Whats the difference?
@kristofferkokus6774
@kristofferkokus6774 5 жыл бұрын
@@LetsBuildThatApp I mean, can you do more with a collectionView? Because it looks like you would build a layout of a tableView using a collectionView..wouldn't it be faster if you were starting with a tableView? Or is there something i am missing 🤔
@LetsBuildThatApp
@LetsBuildThatApp 5 жыл бұрын
I often use both.
@amitjoshi5798
@amitjoshi5798 6 жыл бұрын
Buddy You have 100, thousands+ subscribers. So you can send request to google to verify your a/c to get checkmark on your name.
@rafatwasef8518
@rafatwasef8518 5 жыл бұрын
You did not reply
@staybalancedn
@staybalancedn 5 жыл бұрын
That is a lot of code, just to add some padding, man. I see why IOS Developers make a lot of money. please tell me you get used to it after a while
@aliasadi2550
@aliasadi2550 6 жыл бұрын
ummmmm. miss your accent
Swift 4.2 Stretchy Header Custom Flow Layout (Ep 2)
13:54
Lets Build That App
Рет қаралды 22 М.
iOS Roadmap to Professional Developer: Skills you MUST have!
19:42
Lets Build That App
Рет қаралды 137 М.
Мен атып көрмегенмін ! | Qalam | 5 серия
25:41
Tuna 🍣 ​⁠@patrickzeinali ​⁠@ChefRush
00:48
albert_cancook
Рет қаралды 104 МЛН
So Cute 🥰 who is better?
00:15
dednahype
Рет қаралды 18 МЛН
Advanced Swift: Making Programmatic Auto Layout Easy through Extensions
25:38
Retain Cycles: How to Detect with Instruments Profiler!
13:55
Lets Build That App
Рет қаралды 49 М.
I Made an iOS App in MINUTES with This AI Tool!
13:20
Creator Magic
Рет қаралды 411 М.
LAVROV's interview with Tucker CARLSON 😁 [Parody]
8:34
Юрий ВЕЛИКИЙ
Рет қаралды 355 М.
This Heater Can Save Lives During Power Outages!
19:48
Project Farm
Рет қаралды 560 М.
Beginner Auto Layout & Constraints - Swift 4.2 - Xcode 10
27:10
Sean Allen
Рет қаралды 82 М.
Мен атып көрмегенмін ! | Qalam | 5 серия
25:41