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
  • Наука та технологія

КОМЕНТАРІ • 30

  • @isaaciniongun6568
    @isaaciniongun6568 Рік тому +1

    Great content, absolutely love it.
    Going to use the concepts learned here in a production app straightaway...

  • @hungfhq7919
    @hungfhq7919 Рік тому

    Great tutorial

  • @stevenkirke
    @stevenkirke 5 місяців тому

    Great lesson! I hope there will be more guides.

  • @Callmelatertoday
    @Callmelatertoday Рік тому

    Thank you!!

  • @user-xc2gh4cb3r
    @user-xc2gh4cb3r 4 місяці тому

    24:45 I didn't expect it to be this good. hahahah! Why are you so cool man?

  • @waheedafolabi6929
    @waheedafolabi6929 2 роки тому +2

    Made easy. Awesome.

  • @pepapig8621
    @pepapig8621 Рік тому

    it was very useful

  • @ranganathchenna4559
    @ranganathchenna4559 2 роки тому

    awesome...☀︎

  • @ashishrai381
    @ashishrai381 Рік тому

    Great explanation Emmanuel! just a Question: how can we zoom centere item with .groupPagingCentered option?

  • @prashansamarathunge
    @prashansamarathunge 2 роки тому

    Superb 💯 Waiting for cell animation Video ♥

  • @card1nal312
    @card1nal312 Рік тому

    Wooow! ☄🔥👏🏻

  • @ihemjiereokwara6257
    @ihemjiereokwara6257 2 роки тому

    Well done Emmanuel

  • @jaanioojaanioo6160
    @jaanioojaanioo6160 Рік тому

    Hey Emmanuel! Can u make video about making app using Combine framework and JSON API where U have CollectionView in UIKit?

  • @pickleteach1920
    @pickleteach1920 2 роки тому

    Awesome as always!
    Thinking about creating a Swift course?)

    • @EmmanuelOkwara
      @EmmanuelOkwara  Рік тому

      I really want to but the past few months have been really tight for me 🥲

  • @zardashtjaza1343
    @zardashtjaza1343 Рік тому

    hello Emanuel. , why your app is. using so much of memory? doesn't it memory leak?

  • @TheRealWilcox
    @TheRealWilcox Рік тому

    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?

    • @EmmanuelOkwara
      @EmmanuelOkwara  Рік тому

      I would say that maybe just move it outside the collectionview entirely so that it remains pinned to the top regardless of scroll behavior.

  • @christostsangaris4785
    @christostsangaris4785 2 роки тому

    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.

    • @EmmanuelOkwara
      @EmmanuelOkwara  Рік тому

      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.

  • @abuzarmanzoor5545
    @abuzarmanzoor5545 Рік тому

    lets suppose i have 2 groups, i want to use different uicollectioncell for each group how can i do that?

    • @EmmanuelOkwara
      @EmmanuelOkwara  Рік тому

      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)

  • @doqew9292
    @doqew9292 Рік тому

    брат, спасибо

  • @teaberry73
    @teaberry73 2 роки тому

    The timing! 🤌🏽 I needed to learn this this week and here it is coming through in my subscriptions. Awesome! Thank you so much!

    • @EmmanuelOkwara
      @EmmanuelOkwara  2 роки тому +1

      I’m glad to hear it. 😊

    • @vtrborelli
      @vtrborelli 2 роки тому +1

      really GREAT timing, last week i was trying to find something like the popular section, and I found no good content about it

  • @FaVeShiva
    @FaVeShiva Рік тому

    How would you add data to the different listSections (.stories .popular ...) I get en error message that says items are get-only property.