Build Instagram like UI using Compositional Layout | Swift | Xcode

  Рет қаралды 7,937

iCode

iCode

Күн бұрын

Compositional Layouts can help us build very complex UIs in no time. In this video, I have taken Instagram’s search screen as use case (having a staggered layout) and have replicated the same UI using compositional layout. I’ve also explained the differences between conventional Flow Layout and Compositional Layout. At the end of the video, I’ve also shown that how compositional layouts can help us in making components like carousel with minimal efforts.
Here’s the link of gist 👇🏼
gist.github.com/pallavtrivedi...
Chapters 👇🏼
00:00 Start
01:44 Basic Setup (UICollectionView)
03:38 Anatomy of CollectionViewFlowLayout
04:10 Anatomy of CompositionalLayout
05:25 Explanation of Approach
06:24 Compositional Layout - Implementation
22:29 Final Output
23:36 Carousel Implementation

Пікірлер: 40
@vinitsomani1038
@vinitsomani1038 3 жыл бұрын
I have not used compositional layout till now. After watching this I will definitely give it a shot where ever needed. nicely explained.
@iCode_Happy_Coding
@iCode_Happy_Coding 3 жыл бұрын
Thanks Vinit, glad that you liked it 🙂
@DhavalHNena
@DhavalHNena 2 жыл бұрын
Truly a masterpiece, explaining such a complex feature in easiest way possible! Thanks a lot brother, you're doing a great job. Keep sharing your great content 😊
@Timepass_duniya
@Timepass_duniya 3 жыл бұрын
you are legend bro :) :) , i haven't seen such a very good explanation anywhere . Thanks a lot for your video , you got one more subscriber :p
@iCode_Happy_Coding
@iCode_Happy_Coding 3 жыл бұрын
Thanks for the kind words. I’m glad that you liked the video 🙂
@akashskumar6389
@akashskumar6389 Жыл бұрын
broooooooooo, this was too goood
@sushantalone9387
@sushantalone9387 3 жыл бұрын
Such a brief and informative stuff. I am really eager to make this work with the APIs. Thank You Major 🤠
@iCode_Happy_Coding
@iCode_Happy_Coding 3 жыл бұрын
Great to hear! Thanks Sushant 🙂
@jitendrachanglani2667
@jitendrachanglani2667 3 жыл бұрын
Will definitely try this and your explanation is superb, thanks a lot.👍👍👍👍
@iCode_Happy_Coding
@iCode_Happy_Coding 3 жыл бұрын
Thanks Jitendra, glad that you liked it 🙂
@palotstudio
@palotstudio 3 жыл бұрын
Got to learn new topic. Thank you and keep up the good work
@iCode_Happy_Coding
@iCode_Happy_Coding 3 жыл бұрын
Thanks Vishnu, glad that you liked it 🙂
@denialfian2122
@denialfian2122 3 жыл бұрын
Really nice explanation, thank you so much :))
@iCode_Happy_Coding
@iCode_Happy_Coding 3 жыл бұрын
Thanks Deni, I’m glad that you liked the video 🙂
@DhavalHNena
@DhavalHNena 2 жыл бұрын
Thank you so much!
@dineshtanwar6424
@dineshtanwar6424 3 жыл бұрын
so clear explanation Pallav 👍
@iCode_Happy_Coding
@iCode_Happy_Coding 3 жыл бұрын
Thanks Dinesh, glad that you liked it 🙂
@ephirmdaniel5921
@ephirmdaniel5921 3 жыл бұрын
Excellent I have watched all your videos keep ur good work,..it's very useful
@iCode_Happy_Coding
@iCode_Happy_Coding 3 жыл бұрын
Thanks Ephirm 🙂
@bamanstech3006
@bamanstech3006 2 жыл бұрын
Thank you.
@tripathiprakash22
@tripathiprakash22 3 жыл бұрын
Got to know something new 👍 thanksalot 👍👍👍
@iCode_Happy_Coding
@iCode_Happy_Coding 3 жыл бұрын
My pleasure 😊
@hardipgajera2316
@hardipgajera2316 2 жыл бұрын
I visited too many blogs and apple documentation and videos, but I didn't get this thing to my mind, tried myself but not understood this. and when I visited your video I made a copy of Hotstar, prime, insta feed. you have such an amazing quality of teaching. thanks, man. and this topic itself is so confusable how did you get your hand on this too easily? any special trick?
@AnkitSoni30
@AnkitSoni30 3 жыл бұрын
nice one 👍
@iCode_Happy_Coding
@iCode_Happy_Coding 3 жыл бұрын
Thanks for the visit 🙂
@Aditya-Pathak
@Aditya-Pathak 3 жыл бұрын
Power of apple 🍎💪 nicely explained 👌🏼
@iCode_Happy_Coding
@iCode_Happy_Coding 3 жыл бұрын
Thanks for your constant support Aditya. 🙂
@csmaisuriya91
@csmaisuriya91 3 жыл бұрын
Informative video. Can you please make more videos on compositional layout which covers the following points: - set items to horizontally center so that the part of the previous & next items should be visible in the group. - Set more than one orthogonal behaviour within the single collection view Thanks.
@iCode_Happy_Coding
@iCode_Happy_Coding 3 жыл бұрын
Thanks for watching the video Chintan. I’ll try to cover these points. Thanks 🙂
@rajanmaheshwari
@rajanmaheshwari Жыл бұрын
Hi, Two things I found missing/incorrect in the video: 1. You should have covered the section number UICompositional layout closure for layout. Currently everything (all groups and items) is only on a single collection view section (i.e section = 0). That would have added a lot more weight to the video. As the introduction of various sections eases the dev and layout handling. 2. Secondly, you didn't remove the imageViews while adding in the cellForItemAt method. Whenever the cell dequeues, it will again add the imageView over it. So, there will be multiple image views added for a single cell as soon as you scroll up and down with more items (ex 70). You can check this in Debug View Hierarchy. Rest everything is fine 👍🏻
@user-ec1dn3uz5k
@user-ec1dn3uz5k 3 жыл бұрын
I just discovered your channel and its a gem! keep doing what you are doing my friend. Also do you have any course or videos on Unit testing and UItesting in UIKit ?
@iCode_Happy_Coding
@iCode_Happy_Coding 3 жыл бұрын
Thanks for the kind words 🙂 I haven’t released any courses yet but I’m planning to do some videos on it. Will try to release them soon. Glad that you liked the channel 🙂
@user-ec1dn3uz5k
@user-ec1dn3uz5k 3 жыл бұрын
@@iCode_Happy_Coding do you know any good resource I can use to learn unit testing and ui testing in iOS ?
@iCode_Happy_Coding
@iCode_Happy_Coding 3 жыл бұрын
If you want just a gist, a basic overview, then this article by Ray Wenderlich is good www.raywenderlich.com/21020457-ios-unit-testing-and-ui-testing-tutorial If you are looking for detailed course, this seems good (I haven't tried though) www.udemy.com/course/unit-testing-ios-mobile-app/
@user-ec1dn3uz5k
@user-ec1dn3uz5k 3 жыл бұрын
@@iCode_Happy_Coding thank you very much my friend! I’ll be learning from both resources. Appreciate the links
@gulamali1855
@gulamali1855 10 ай бұрын
How do we know the name of specific item (group1Item1) in cellForRow to show the specific type of content ? Just like Instagram the video always shows in cell that is bigger in size.. how we achieve this ?
@ravneetsingh8790
@ravneetsingh8790 3 ай бұрын
Very nice and informative video 🎉🎉🎉 I am having some problems in making the profile screen like instagram and twitter but couldn’t make it due to it’s nested scrolling thing can you please make a video that as well ? I am using XLPagerTabStrip to switch between tabs but having issues in making vertical scroll with profile screen header
@tabishghaus8372
@tabishghaus8372 2 жыл бұрын
Can you create with diffable different datasource with this layout
@smrkdr0
@smrkdr0 2 жыл бұрын
Can we make a bus ticket booking layout with this?
@Shade_with_me_7
@Shade_with_me_7 2 жыл бұрын
Hi ,thanks for making such amazing videos is it possible to convert it into reusable code in best way(specific to create group and item for every section)? If possible can you make video/or share with us?
Improve Debugging Skills | iOS | Swift/Obj C | Xcode
26:02
Gym belt !! 😂😂  @kauermotta
00:10
Tibo InShape
Рет қаралды 18 МЛН
ОБЯЗАТЕЛЬНО СОВЕРШАЙТЕ ДОБРО!❤❤❤
00:45
Doing This Instead Of Studying.. 😳
00:12
Jojo Sim
Рет қаралды 20 МЛН
Best Toilet Gadgets and #Hacks you must try!!💩💩
00:49
Poly Holy Yow
Рет қаралды 22 МЛН
Colosseum Demo Day | Accelerator Cohort 1
31:50
Colosseum
Рет қаралды 3
UICollectionViews in iOS with Compositional Layout
15:25
Sam Meech-Ward
Рет қаралды 6 М.
What's going on with Windows Laptops?
10:30
Marques Brownlee
Рет қаралды 2,6 МЛН
SWIFT Уроки: Compositional Layout - Основы(item, group, section)
50:21
Сергей Горбачёв / cmd+B, cmd+R
Рет қаралды 6 М.
Main Thread, Sync vs Async and Deadlocks in Swift
9:49
iCode
Рет қаралды 13 М.
Swift: How to UICollectionView Flow Layout
35:19
Swift Arcade
Рет қаралды 10 М.
Gym belt !! 😂😂  @kauermotta
00:10
Tibo InShape
Рет қаралды 18 МЛН