iOS Dev 42: Multiple Section CollectionView with Compositional Layout | Swift 5, XCode 13
Вставка
- Опубліковано 2 сер 2024
- Today, we learn how to apply different layouts to each section in a UICollectionView using UICollectionViewCompositionalLayout.
Resources:
Starter Project: github.com/EMacco/ios-tutoria...
Finished Project: github.com/EMacco/ios-tutoria...
Say Hi on Social Media:
LinkedIn: /
Instagram: its_macco?...
Twitter: / its_macco
Video Content
Introduction 00:00
Starter Project Overview 00: 42
Create Section Layout 05:21
Add Section Header 15:54
Add Popular Section 22:09
Add Coming Soon Section 26:53
Conclusion 29:50
#ios #iosdeveloper #swift #collectionView #layouts #programming - Наука та технологія
Great content, absolutely love it.
Going to use the concepts learned here in a production app straightaway...
I’m glad I could help 🔥🔥🔥
Great tutorial
Great lesson! I hope there will be more guides.
Thank you!!
24:45 I didn't expect it to be this good. hahahah! Why are you so cool man?
Made easy. Awesome.
Thanks, Waheed 😊
it was very useful
awesome...☀︎
Great explanation Emmanuel! just a Question: how can we zoom centere item with .groupPagingCentered option?
Superb 💯 Waiting for cell animation Video ♥
Wooow! ☄🔥👏🏻
Well done Emmanuel
Thanks, mom ❤️😊
Hey Emmanuel! Can u make video about making app using Combine framework and JSON API where U have CollectionView in UIKit?
Awesome as always!
Thinking about creating a Swift course?)
I really want to but the past few months have been really tight for me 🥲
hello Emanuel. , why your app is. using so much of memory? doesn't it memory leak?
Is there anyway to pin the section 0 to top of screen? So when the rest of sections scroll section zero will stay on top?
I would say that maybe just move it outside the collectionview entirely so that it remains pinned to the top regardless of scroll behavior.
Great explanation Emmanuel! Just a question: How could we have optional sections? For example, if the Popular data were not available, then skip the Popular header and cells and instead show the Coming Soon section? If I just skip this in the datasource, then the Coming Soon section will populate the Popular section layout and it will break the UI. Thank you in advance.
Thanks, Christos
Because we use a switch statement to style the section, the collectionview will only use the layout for the section if it is visible.
This means that if we were to remove the popular section, it’ll just show the coming soon next.
You can try that out by removing the popular section from the pageData in MockData file.
lets suppose i have 2 groups, i want to use different uicollectioncell for each group how can i do that?
You can determine which cell to display in the cellForItemAt indexPath based on the section or index, you’ll select the cell to use. 04:54
The layout compositional layout only cares about how to size the cells (whatever they are)
брат, спасибо
The timing! 🤌🏽 I needed to learn this this week and here it is coming through in my subscriptions. Awesome! Thank you so much!
I’m glad to hear it. 😊
really GREAT timing, last week i was trying to find something like the popular section, and I found no good content about it
How would you add data to the different listSections (.stories .popular ...) I get en error message that says items are get-only property.