SwiftUI Basics: Dynamic Lists, HStack VStack, Images with Circle Clipped Stroke Overlays

  Переглядів 80,600

Lets Build That App

Lets Build That App

День тому

Lots and lots of interesting applications you can build with SwiftUI, including some very complex layouts that can be achieved with just a couple of widgets. Let's dive into construction of a dynamic list of Users, along with constructing HStack and VStack elements for our rows.
AppStore JSON APIs
www.letsbuildthatapp.com/cour...
Tinder Firestore Swipe and Match
www.letsbuildthatapp.com/cour...
Twitter Slide Out Menu Course
www.letsbuildthatapp.com/cour...
Podcasts Course
www.letsbuildthatapp.com/cour...
Intermediate Training Core Data
www.letsbuildthatapp.com/cour...
Instagram Firebase Course
www.letsbuildthatapp.com/cour...
Facebook Group
/ 1240636442694543
Completed Source Code
www.letsbuildthatapp.com/cour...
Instagram: / buildthatapp
Twitter: / buildthatapp
Hackintosh Build
i9 9900k: amzn.to/2CvQj6v
ASUS Z390 Motherboard: amzn.to/2JpaQ2B
16GB Corsair Vengeance RGB RAM: amzn.to/2YbygvJ
Corsair H100i Platinum Water Cooler: amzn.to/2FnbM22
Thermaltake RGB Power Supply: amzn.to/2TgKDTu
Intel 1TB SSD: amzn.to/2Tkdk1V
Corsair 280x Computer Case: amzn.to/2WcjvH2
AMD Radeon 4GB RAM GFX Card: amzn.to/2TYMyAp
LG 34" Widescreen 3440 x 1440: amzn.to/2Tk7q0S
Rode NT1 Microphone: amzn.to/2TZgX1r
Focusrite Audio Interface: amzn.to/2U12gey
Panasonic GH4 DSLR: amzn.to/2U4BrG6
Magewell HDMI to USB3 Capture Card: amzn.to/2Jp2esI

КОМЕНТАРІ: 177
@NPCTE23
@NPCTE23 4 роки тому
Your Flutter videos really helped me not to get crazy when I saw these big changes in the framework! Whew! Thanks for the tutorial, Brian! Always on time!
@brennanhamstra2148
@brennanhamstra2148 4 роки тому
Wow! This is pretty amazing and what I believe the right step to take for UI now. Amazing tutorials as always Brian! Thank you for crushing it on content all ready for the new SwiftUI framework! Pretty amazing, and I'm looking forward to new tutorials with this sort of layout. Keep crushing it man!
@rekeshali
@rekeshali 4 роки тому
Whoa O_O this is a lot easier than using a collection view, thanks for staying on top of the new methods!
@Veterinarius62
@Veterinarius62 4 роки тому
coding makes more and more fun with SwiftUI and of course with Brian's tutorials!
@antonfimin
@antonfimin 3 роки тому
Thank you man for your effort, I love learning from your videos, extra + for the sound quality! I wish everyone in UKposts making videos like you do
@im_semih
@im_semih 4 роки тому
It's just amazing. Thank you Brian!
@rogerwprice
@rogerwprice 4 роки тому
Thanks for the walkthrough!
@thewatcher305
@thewatcher305 4 роки тому
Enjoying that more declarative syntax!
@drope5156
@drope5156 4 роки тому
Great tutorial, would be nice to see two more segments about fetching real data from an api as well as persisting it to see a full application built with Swift UI. Thanks!
@stefvanzwienen608
@stefvanzwienen608 4 роки тому
I second this. It's always dummy data that comes from within the app but never some JSON that get's decoded and put in the right place..
@timmy334
@timmy334 4 роки тому
I am loving SwiftUI. This is much faster and simpler.
@tiborgabor9632
@tiborgabor9632 4 роки тому
Thank you for the lesson! I enjoyed it!
@marcaupont9145
@marcaupont9145 4 роки тому
This tutorial was AAA MMM AAA ZZZ IIII NNNN GGGG!! I can really see the power of SwiftUI! Great job Brian!
@codemonkey21
@codemonkey21 4 роки тому
Awesome work! Can’t wait to see more SwiftUI and integrate with database data sources like Firebase.
@piotrkwasniewski7774
@piotrkwasniewski7774 4 роки тому
Super useful, Thank you Brian! :)
@NTuneLabs
@NTuneLabs 2 роки тому
You really need to be making more videos for beginners... like myself. I like the way you explain things.
@Shayan_R
@Shayan_R 4 роки тому
Fantastic video Brian! 👏🏼👏🏼👏🏼👏🏼👏🏼👏🏼👏🏼 Quickly learnt so much 👀
@donmcallister4382
@donmcallister4382 4 роки тому
Awesome, thanks! Loving it.
@israelmanzo8725
@israelmanzo8725 4 роки тому
Insane, but I love it..! Thanks Brian. I'll keep reading documentations but your videos makes it way easier to understand. I wonder how it works with network calls.
@RushMeh
@RushMeh 4 роки тому
I’m wondering the same. Such a cool stuff
@yamatatsu5776
@yamatatsu5776 4 роки тому
You are great teacher!!! Thank you!
@ikechukwumichael1383
@ikechukwumichael1383 4 роки тому
great and easy to follow along practically
@SteveeOR97
@SteveeOR97 4 роки тому
Excellent vid very easy to follow. Thanks :)
@DaveyonMayne-ok
@DaveyonMayne-ok 3 роки тому
Swear down. Bro... you are my go-to for all things Swift. Thanks!
@peteroriola6493
@peteroriola6493 4 роки тому
Amazing stuff . Thanks
@mattberkeley15
@mattberkeley15 4 роки тому
Hey man, I'm loving your tutorials so far - thanks for all you do! One comment, since you added the the struct User was Identifiable, you don't actually have to specify in your ForEach loop what its identified by so long as you have the id in each instance of users. Cleans it up a little!
@marcvaniersel1623
@marcvaniersel1623 4 роки тому
Very nice tutorial, thank you!
@wtam4357
@wtam4357 4 роки тому
Great as usual Brian..thanks a lot
@AndreaTermini3
@AndreaTermini3 4 роки тому
You Brian, are the best!
@brazo98
@brazo98 4 роки тому
Thank you Dude! Go ahead further...
@Savin1992iVashka
@Savin1992iVashka 4 роки тому
Awesome! Thanks!
@isaacclark9825
@isaacclark9825 4 роки тому
Don't worry about overdoing it. I really like getting a preview of how this works. I won't be installing the beta version of the OS, so this is my chance to get a headstart.
@AudriezWorld
@AudriezWorld 4 роки тому
i really enjoy your videos, keep it up
@RockstahRolln
@RockstahRolln 4 роки тому
What a tutorial! You won me over, I subbed! :)
@mirjalolsirojiddinov3043
@mirjalolsirojiddinov3043 4 роки тому
Thank you!
@dchang635
@dchang635 4 роки тому
GREAT TEACHING!
@tarekmustafa2525
@tarekmustafa2525 4 роки тому
Great Tutorial!
@kheangsenghort842
@kheangsenghort842 4 роки тому
Thanks Brian for the best tutorial.!!! :DDDDDD
@gregorymolette118
@gregorymolette118 4 роки тому
Great video thanks
@digitalsuperman
@digitalsuperman 4 роки тому
wow swiftui looks fun!
@filipvabrousek6900
@filipvabrousek6900 4 роки тому
Thank you so much Brian! How do I change TextField alignment?
@bandishkumar1990
@bandishkumar1990 4 роки тому
Superb
@TheSpiralnotizblock
@TheSpiralnotizblock 4 роки тому
Wow swiftui is amazing.
@ngado126
@ngado126 4 роки тому
Hi Brian! Your tutorial is awsome. My question is how to keep the image always on top of the row even when the message is long? Thanks Nga
@srikanth1992
@srikanth1992 4 роки тому
excellent tutorial..
@iOSTechie
@iOSTechie 4 роки тому
Awesome video 👍
@buthex
@buthex 4 роки тому
this is awesome
@emiliebellier9017
@emiliebellier9017 4 роки тому
Thanks for another great video ! Question : How to make a List (or ScrollView) scroll to the bottom (like chat type) ?
@iGageit
@iGageit 4 роки тому
great video! keep it up!
@ronroy100
@ronroy100 4 роки тому
Hey Brian, Great tutorial, I have one question though, for VStack or other components too, I have observed some properties goes inside bracket like alignment, and some properties goes outside of curly braces like padding. What are the difference between these. Thanks,
@kamalzakaria6374
@kamalzakaria6374 4 роки тому
thanks boss!!
@JunaidKhan-ny8tu
@JunaidKhan-ny8tu 4 роки тому
Love your content , Huge fan of you :-) for almost 2 and half year
@maxcodes
@maxcodes 4 роки тому
Same here bro, he's easily my favorite iOS UKpostsr. Probably my favorite UKpostsr just behind MKBHD.
@JunaidKhan-ny8tu
@JunaidKhan-ny8tu 4 роки тому
@@maxcodes bro your content is also awesome
@maxcodes
@maxcodes 4 роки тому
@@JunaidKhan-ny8tu Thank you man!
@vineethkrishnan1337
@vineethkrishnan1337 4 роки тому
Nice tutorial
@vikkaalfyorova
@vikkaalfyorova 4 роки тому
Thank you for the great lesson. What if my object has a bool property (state), how can I show it in the List row? Toggle(isOn: $user.state) didn't work
@dalekkiller
@dalekkiller 4 роки тому
Are there other shapes that you can use with the .clipshape() like hexagons for the boarders of the image?
@menteb
@menteb 4 роки тому
Brian, what would be nice to see is how you truncate a Text() in a VStack in a detailed View (not a List). I tried every possible way to have the lines stay in the frame, to no avail. Also trying to find out how an Image() in a VStack can take the full width of the screen instead of going overboard.
@user-mt3tp5th5t
@user-mt3tp5th5t 4 роки тому
so cool
@andrejkling3886
@andrejkling3886 3 роки тому
Gratitude Brian....
@NicAlexReich
@NicAlexReich 4 роки тому
Nic Reich [9:41 AM] I'm really excited about the Xcode 11, SwiftUI looks amazing and looks like it is going to be a great alternative to using storyboards, but is it just me or doesn't SwiftUI look a lot like Flutter?
@hubrismaxim
@hubrismaxim 4 роки тому
Two comments: If your model conforms to Identifiable, then you can just pass it straight into ForEach; no need for the .identified(by:). Also, when you refer to brace syntax, it’s just trailing closure syntax on an .init() - of course it’s doing some magic in the background which is why you need to use the ForEach structure rather than plain for..in loops or switch statements.
@bratz2
@bratz2 4 роки тому
As far as your comment about the price of the pro display. Reference monitors are normally around $30,000 to $40,000. It’s for a specific market for specific use. So that being the case Apple is offering a great value to THAT SPECIFIC market. It’s understandable that to normal people not in that market it seems like an outrageous price. Both the Mac Pro computer and the Pro display are not considered expensive for the actual pros in that market who make enough on the work they do to cover it. Those tools are what enables them to do their work. Now about your video. Great job!
@LetsBuildThatApp
@LetsBuildThatApp 4 роки тому
Indeed, I was just trolling. I will most likely buy both a Mac Pro and xdr display when they become available.
@neluma
@neluma 4 роки тому
How do you enable Automatic Preview? My project boilerplate opened up with the editor only.
@smackaroony
@smackaroony 4 роки тому
I dig it
@ghareeshkumar
@ghareeshkumar 4 роки тому
Amazing video it is. But what about dynamic values. As you showed with static values
@aliasadi2550
@aliasadi2550 4 роки тому
how do you handle increasing views on the larger screen ? when you use static width and height ? do we have multiplier in new Swift ?
@arsalanhashemi4469
@arsalanhashemi4469 4 роки тому
Nice
@angryapple1882
@angryapple1882 4 роки тому
How would you do a but to on a Navigationview?
@SudhanshuSrivastavaIndia
@SudhanshuSrivastavaIndia 4 роки тому
List looks amazing.. one thing I am curious about is how "row insertion" or deletion will work here in List.. kind of LoadMore stuff as we used to implement it in UITableView.
@dk-sky3820
@dk-sky3820 4 роки тому
Have you seen their WWDC presentation on datasource.snapshots and apply( ) yesterday? I think it's the answer.
@digvijaygida7388
@digvijaygida7388 4 роки тому
How to using SwiftUI remote notification and notification on a detail screen open?
@scthief4421
@scthief4421 3 роки тому
For those who who stuck at the forEach loop it is ForEach(users, id: \.id) { user
@saifullahilyas8170
@saifullahilyas8170 4 роки тому
Hello, i hope you are fine. Sir can navigate to view controller from swiftui just like the perform segues. So that we built our half app in swiftui and half in storyboard.
@tomtucker8466
@tomtucker8466 Рік тому
how would you make it so that each of those has its own navigation link the goes to its own view
@Dennisvm82
@Dennisvm82 4 роки тому
This is ridiculous :D all my old-school extensions will become obsolete, and you can code everything with 70% less code. Can't wait to start playing with this :-) looks really interesting. In 2021 you only have to write createList(withArray: User).design(.stylish), and you are done :-P
@fredericbontemps6569
@fredericbontemps6569 4 роки тому
Great tutorial as always, Brian, thanks a lot! In order to build a "standard" macOS app (so NOT for iOS nor iPadOS) would you still recommend SwiftUI or Interface Builder is still more convenient?
@LetsBuildThatApp
@LetsBuildThatApp 4 роки тому
Cool, thanks for watching. I haven't used IB in 5 years, so code has always been easy and familiar.
@fredericbontemps6569
@fredericbontemps6569 4 роки тому
Thanks for your quick reply, very much appreciated! If you don't mind, when you have time, could you kindly show an example (if technically possible, of course) of how to build a macOS app using SwiftUI, please? I'm aware the code it's portable, but the look 'n' feel of an iOS app on macOS using SwiftUI is a bit "html style". Is it possible to build a UI like the Finder, for example, in SwiftUI? Or Interface Builder would be the quickest way to go? Many thanks in advance.
@maxcodes
@maxcodes 4 роки тому
You're so much faster at making these videos than me hahaha. Good content as always.
@davidkadlcek4949
@davidkadlcek4949 4 роки тому
Hi Max, do you know how to change backgroundColor of View?
@owenmoore3782
@owenmoore3782 4 роки тому
David Kadlček You can use: .background(Color.red)
@maxcodes
@maxcodes 4 роки тому
@@davidkadlcek4949 Yeah! .background(.red) looks like Owen beat me to it!
@davidkadlcek4949
@davidkadlcek4949 4 роки тому
​@@maxcodes OK, but what about safeArea? How can I avoid it? I tried edgesIgnoringSafeArea, but the views inside VStack just ignores safeArea too...
@aravinthroshan6500
@aravinthroshan6500 4 роки тому
It would be wonderful if you could develop a full fledged replica of a social media app in swiftUI. The contents in your website taught me swift as I know today and it would be great even if you could update the existing courses or come up with an entirely new one on how to program in swiftUI.
@mobilestar6575
@mobilestar6575 4 роки тому
Hello Brian, Thanks for sharing wonderful video and this video helped me much. Now I have better understanding of SwiftUI framework. Btw I'm just curious, we can't use storyboard anymore if we use SwiftUI from Xcode 11? And also do we need to re-develop existing app (which uses storyboards) from scratch if we want to use Swift UI? Thanks.
@HungNguyen-oz1jc
@HungNguyen-oz1jc 4 роки тому
I think storyboards is dying and will be deprecated when SwiftUI is getting more popular
@mobilestar6575
@mobilestar6575 4 роки тому
@@HungNguyen-oz1jc i think so,
@gavinbeard8188
@gavinbeard8188 4 роки тому
Great video! Silly question but how do you get the preview to show ? I notice on your video it is shown automatically but when I create project with SwiftUi I don’t get the preview
@MattiaRighetti
@MattiaRighetti 4 роки тому
Gavin Beard you have to be on the latest macOS Catilina to get the preview and of course have the latest Xcode 11
@stevenen8
@stevenen8 4 роки тому
Hello thanks for the tutorial. I just want to pointing out that if you add some kind of NavigationLink around the UserRow's HStack (in order to show eventually a detail for the element) it seems that the multiline doesn't works anymore. Do you have any suggestion on this behavior? Thanks @LetsBuildThatApp
@LetsBuildThatApp
@LetsBuildThatApp 4 роки тому
I think it does, you just have to apply some tricks
@kainate5779
@kainate5779 4 роки тому
Should I download the beta version? and when would this version realise on actual Xcode?
@Am1rFT
@Am1rFT 4 роки тому
have you noticed that the code which was used to present a view controller in xcode 10 and earlier has been changed??previously viewcontrollers where came up from botton but now it is like apple music app when the player comes up.if you found any way to solve it i would appreciate it 👍🏻
@ashokmurthy7831
@ashokmurthy7831 3 роки тому
For Xcode 12.1, the "ForEach" syntax now becomes : "ForEach(users, id: \.id) { user in ....". Thx for a great tutorial.
@stevengao8345
@stevengao8345 4 роки тому
thanks very much for this tutorial, but how is this swiftui suppose make developing life any easier? the things you typed are they swift or something apple just invent out of blue ? code is more like html css than swift coding.
@martinacatherine88
@martinacatherine88 4 роки тому
How would you compare this to Flutter?
@40tutur
@40tutur 4 роки тому
Will the viewControllers disappears ??
@DannyBoy443
@DannyBoy443 3 роки тому
As someone who is (especially since the pandemic) trying to learn iOS development for a new career flip, no. You are not spending too much time on Swift. I still can't build anything yet and I've been studying for about a year.
@Ebadd9
@Ebadd9 3 роки тому
At 12:00 change ForEach(users.identified(by: \id)) to ForEach(users, id: \.id) and it works.
@a2somali-ish588
@a2somali-ish588 3 роки тому
it keeps telling me Cannot infer contextual base in reference to member 'init' when I try to use init under ConductView View
@checkupapp
@checkupapp 4 роки тому
so if we are practical, can you a Designer create the front end design and navigation of the app, while a backend coder can fill in things with the functionality?
@dk-sky3820
@dk-sky3820 4 роки тому
Functionality of the app is still front-end. Backend is the server side.
@Vyacheslavskiy
@Vyacheslavskiy 4 роки тому
I've played with SwiftUI for a couple of days now but I still don't know how to remove separators from list. Does anybody found a solution for it?
@redpickle
@redpickle Рік тому
Im having issues with the ForEach(users.identified ... part. The .identified property doesn't seems to exist. Is this something that is deprecated or replaced with some other method. I don't know how to overcome this. It's 12:00 in the video if anyone wanna double check it btw.
@josuegisber8150
@josuegisber8150 4 роки тому
Quick question: why not using List(0 ..< 5) { item in user) } ? look easier to me.
@tejassethi9319
@tejassethi9319 4 роки тому
Can you please make a video on how to make a music player in swift ui.
@UnFuryYY
@UnFuryYY 4 роки тому
intro song?
@menteb
@menteb 4 роки тому
Thanks Brian! Always on top of stuff :) Instead of your ForEach, try List(users){ user in }.navigationBarTitle(Text("Dynamic List"), displayMode: .large) This will go through everything as well, and it's cleaner in my opinion.
@StewartLynch
@StewartLynch 4 роки тому
I think Brian's point here is that if you do that, you cannot add the row above that is simply "Users"
@anthonycavender7253
@anthonycavender7253 4 роки тому
menteb I know it’s late but: To combine static and dynamic views in a list, or to combine two or more different groups of dynamic views, use the ForEach type instead of passing your collection of data to List. -SwiftUI documentation
@MattiaRighetti
@MattiaRighetti 4 роки тому
Straight question, is this new framework gonna make you switch from programmatically coding the UI?
@LetsBuildThatApp
@LetsBuildThatApp 4 роки тому
For these high level simple screens, its very easy to get them done using SwiftUI. For deeper low level work, you'll still need code like the rest of the other platforms on earth.
@TJ24291
@TJ24291 4 роки тому
I didn't find your another tutorial that you promised in this tutorial - To build SwiftUI app for all those horizontal and vertical lists and the fancy UI. Di you not make the video yet or am I not able to find it? post the link if anyone has it.
@LetsBuildThatApp
@LetsBuildThatApp 4 роки тому
Its been up on the channel for months already, please search under videos.
@TJ24291
@TJ24291 4 роки тому
@@LetsBuildThatApp Thanks. Found it.
@isaacclark9825
@isaacclark9825 4 роки тому
The LBATools materials you developed. Doesn't this new stuff make that obsolete?
@LetsBuildThatApp
@LetsBuildThatApp 4 роки тому
LBTATools works great for standards UIKit apps still.
@isaacclark9825
@isaacclark9825 4 роки тому
I suppose my question was somewhat rude. Yes, there is no question that LBATools works great and can enhance productivity. But what I am really asking is whether you expect folks to switch to SwiftUI in pretty short order. I expect that I will switch just as soon as I switch over to the new version of Xcode.
@michaelstamper5434
@michaelstamper5434 4 роки тому
has anyone figure out how to do webview
@toastrecon
@toastrecon 4 роки тому
So, dumb question: timeline for being able to use this in production apps? We have to wait until the new iOS is released, correct, and then, it'll work with the 80-90% of iOS users who adopt right away?
@hubrismaxim
@hubrismaxim 4 роки тому
Essentially correct. With one exception: it should work on the very latest releases of macOS 10.4 and iOS 12 - it works there currently and most people who are currently on the latest releases of those platforms are likely to upgrade right away so they should be a very small cohort.
@MrJAEChannel
@MrJAEChannel 4 роки тому
Hey Brian, are you using Catalina?
@thachphamngoc5343
@thachphamngoc5343 4 роки тому
Tools for SwiftUI development are only available when running on macOS 10.15 beta.
@hubrismaxim
@hubrismaxim 4 роки тому
Thạch Phạm Ngọc You can do SwiftUI development on macOS 10.14 - but you won’t get the live preview. You can fake it with preview. Of course you need the XCode 11 beta installed.
@mabco888
@mabco888 4 роки тому
In your ForEach, you don't need to use the users.identified(by:) because you made your Users model object conform to Identifiable. You only have to do that when your model object doesn't adopt the Identifiable protocol. Either way though, you still need a unique identifier. So, your ForEach just needs to just be ForEach(users) {...}
@StewartLynch
@StewartLynch 4 роки тому
And, I am assuming, if you remove the Identifiable conformance, you can use the identified(by: )on any unique value. So, for example, if the names were all unique and you did not have an id field and no conformance to the identifiable protocol, you could use FOREACH(users.identified(by: \.name) instead
SwiftUI vs UIKit - Comparison of building the same app in each framework
15:14
Помилка,  яку зробило військове керівництво 🙄
01:00
Радіо Байрактар
Переглядів 375 тис.
Swift API Calls for Beginners (Networking) - Async Await & JSON
25:35
The Only .NET Scheduler You Should Be Using!
16:38
Nick Chapsas
Переглядів 33 тис.
Performance between LazyVStack, VStack and List #SwiftUI
8:09
Swift and Tips
Переглядів 9 тис.
Building a scalable, modularized, testable app from scratch
21:31
Android Developers
Переглядів 150 тис.
Intro to SwiftData - Model, Container, Fetch, Create, Update & Delete
27:13
SwiftUI Essentials - HStack VStack ZStack Unexpected Spacing and Alignment
23:08
Lets Build That App
Переглядів 31 тис.
SwiftUI MVVM Programming with ObservableObject @Published @ObservedObject
17:57
Lets Build That App
Переглядів 72 тис.
SwiftUI Reactive Intro: State Management and Bindings
18:41
Lets Build That App
Переглядів 28 тис.
How To Build Responsive User Interfaces with SwiftUI
18:38
CodeWithChris
Переглядів 25 тис.
SwiftUI Scroll Animation using GeometryReader
4:03
DesignCode
Переглядів 49 тис.