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

  Рет қаралды 80,702

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 5 жыл бұрын
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!
@Veterinarius62
@Veterinarius62 5 жыл бұрын
coding makes more and more fun with SwiftUI and of course with Brian's tutorials!
@brennanhamstra2148
@brennanhamstra2148 5 жыл бұрын
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 5 жыл бұрын
Whoa O_O this is a lot easier than using a collection view, thanks for staying on top of the new methods!
@antonfimin
@antonfimin 3 жыл бұрын
Thank you man for your effort, I love learning from your videos, extra + for the sound quality! I wish everyone in KZfaq making videos like you do
@marcaupont9145
@marcaupont9145 5 жыл бұрын
This tutorial was AAA MMM AAA ZZZ IIII NNNN GGGG!! I can really see the power of SwiftUI! Great job Brian!
@dirtbagmoto
@dirtbagmoto 5 жыл бұрын
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..
@im_semih
@im_semih 5 жыл бұрын
It's just amazing. Thank you Brian!
@Shayan_R
@Shayan_R 5 жыл бұрын
Fantastic video Brian! 👏🏼👏🏼👏🏼👏🏼👏🏼👏🏼👏🏼 Quickly learnt so much 👀
@thewatcher305
@thewatcher305 5 жыл бұрын
Enjoying that more declarative syntax!
@rogerwprice
@rogerwprice 5 жыл бұрын
Thanks for the walkthrough!
@timmy334
@timmy334 5 жыл бұрын
I am loving SwiftUI. This is much faster and simpler.
@tiborgabor9632
@tiborgabor9632 4 жыл бұрын
Thank you for the lesson! I enjoyed it!
@codemonkey21
@codemonkey21 5 жыл бұрын
Awesome work! Can’t wait to see more SwiftUI and integrate with database data sources like Firebase.
@piotrkwasniewski7774
@piotrkwasniewski7774 5 жыл бұрын
Super useful, Thank you Brian! :)
@SteveeOR97
@SteveeOR97 5 жыл бұрын
Excellent vid very easy to follow. Thanks :)
@wtam4357
@wtam4357 5 жыл бұрын
Great as usual Brian..thanks a lot
@israelmanzo8725
@israelmanzo8725 5 жыл бұрын
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 5 жыл бұрын
I’m wondering the same. Such a cool stuff
@DaveyonMayne-ok
@DaveyonMayne-ok 3 жыл бұрын
Swear down. Bro... you are my go-to for all things Swift. Thanks!
@donmcallister4382
@donmcallister4382 5 жыл бұрын
Awesome, thanks! Loving it.
@ikechukwumichael1383
@ikechukwumichael1383 4 жыл бұрын
great and easy to follow along practically
@yamatatsu5776
@yamatatsu5776 5 жыл бұрын
You are great teacher!!! Thank you!
@RockstahRolln
@RockstahRolln 5 жыл бұрын
What a tutorial! You won me over, I subbed! :)
@marcvaniersel1623
@marcvaniersel1623 4 жыл бұрын
Very nice tutorial, thank you!
@AudriezWorld
@AudriezWorld 4 жыл бұрын
i really enjoy your videos, keep it up
@dchang635
@dchang635 5 жыл бұрын
GREAT TEACHING!
@AndreaTermini3
@AndreaTermini3 5 жыл бұрын
You Brian, are the best!
@peteroriola6493
@peteroriola6493 5 жыл бұрын
Amazing stuff . Thanks
@kheangsenghort842
@kheangsenghort842 5 жыл бұрын
Thanks Brian for the best tutorial.!!! :DDDDDD
@brazo98
@brazo98 5 жыл бұрын
Thank you Dude! Go ahead further...
@tarekmustafa2525
@tarekmustafa2525 4 жыл бұрын
Great Tutorial!
@digitalsuperman
@digitalsuperman 5 жыл бұрын
wow swiftui looks fun!
@Savin1992iVashka
@Savin1992iVashka 5 жыл бұрын
Awesome! Thanks!
@NTuneLabs
@NTuneLabs 2 жыл бұрын
You really need to be making more videos for beginners... like myself. I like the way you explain things.
@isaacclark9825
@isaacclark9825 5 жыл бұрын
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.
@filipvabrousek6900
@filipvabrousek6900 5 жыл бұрын
Thank you so much Brian! How do I change TextField alignment?
@gregorymolette118
@gregorymolette118 5 жыл бұрын
Great video thanks
@iOSTechie
@iOSTechie 5 жыл бұрын
Awesome video 👍
@mirjalolsirojiddinov3043
@mirjalolsirojiddinov3043 5 жыл бұрын
Thank you!
@iGageit
@iGageit 5 жыл бұрын
great video! keep it up!
@ngado126
@ngado126 5 жыл бұрын
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
@mattberkeley15
@mattberkeley15 5 жыл бұрын
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!
@TheSpiralnotizblock
@TheSpiralnotizblock 5 жыл бұрын
Wow swiftui is amazing.
@srikanth1992
@srikanth1992 5 жыл бұрын
excellent tutorial..
@emiliebellier9017
@emiliebellier9017 4 жыл бұрын
Thanks for another great video ! Question : How to make a List (or ScrollView) scroll to the bottom (like chat type) ?
@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,
@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
@JunaidKhan-ny8tu
@JunaidKhan-ny8tu 5 жыл бұрын
Love your content , Huge fan of you :-) for almost 2 and half year
@maxcodes
@maxcodes 5 жыл бұрын
Same here bro, he's easily my favorite iOS KZfaqr. Probably my favorite KZfaqr just behind MKBHD.
@JunaidKhan-ny8tu
@JunaidKhan-ny8tu 5 жыл бұрын
@@maxcodes bro your content is also awesome
@maxcodes
@maxcodes 5 жыл бұрын
@@JunaidKhan-ny8tu Thank you man!
@bandishkumar1990
@bandishkumar1990 4 жыл бұрын
Superb
@buthex
@buthex 5 жыл бұрын
this is awesome
@vineethkrishnan1337
@vineethkrishnan1337 5 жыл бұрын
Nice tutorial
@NicAlexReich
@NicAlexReich 5 жыл бұрын
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?
@dalekkiller
@dalekkiller 4 жыл бұрын
Are there other shapes that you can use with the .clipshape() like hexagons for the boarders of the image?
@kamalzakaria6374
@kamalzakaria6374 5 жыл бұрын
thanks boss!!
@menteb
@menteb 5 жыл бұрын
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.
@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 ?
@user-mt3tp5th5t
@user-mt3tp5th5t 5 жыл бұрын
so cool
@neluma
@neluma 5 жыл бұрын
How do you enable Automatic Preview? My project boilerplate opened up with the editor only.
@maxcodes
@maxcodes 5 жыл бұрын
You're so much faster at making these videos than me hahaha. Good content as always.
@davidkadlcek4949
@davidkadlcek4949 5 жыл бұрын
Hi Max, do you know how to change backgroundColor of View?
@owenmoore3782
@owenmoore3782 5 жыл бұрын
David Kadlček You can use: .background(Color.red)
@maxcodes
@maxcodes 5 жыл бұрын
@@davidkadlcek4949 Yeah! .background(.red) looks like Owen beat me to it!
@davidkadlcek4949
@davidkadlcek4949 5 жыл бұрын
​@@maxcodes OK, but what about safeArea? How can I avoid it? I tried edgesIgnoringSafeArea, but the views inside VStack just ignores safeArea too...
@ghareeshkumar
@ghareeshkumar 4 жыл бұрын
Amazing video it is. But what about dynamic values. As you showed with static values
@saifullahilyas8170
@saifullahilyas8170 5 жыл бұрын
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.
@smackaroony
@smackaroony 5 жыл бұрын
I dig it
@SudhanshuSrivastavaIndia
@SudhanshuSrivastavaIndia 5 жыл бұрын
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 5 жыл бұрын
Have you seen their WWDC presentation on datasource.snapshots and apply( ) yesterday? I think it's the answer.
@arsalanhashemi4469
@arsalanhashemi4469 4 жыл бұрын
Nice
@angryapple1882
@angryapple1882 4 жыл бұрын
How would you do a but to on a Navigationview?
@gavinbeard8188
@gavinbeard8188 5 жыл бұрын
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 5 жыл бұрын
Gavin Beard you have to be on the latest macOS Catilina to get the preview and of course have the latest Xcode 11
@kainate5779
@kainate5779 5 жыл бұрын
Should I download the beta version? and when would this version realise on actual Xcode?
@fredericbontemps6569
@fredericbontemps6569 5 жыл бұрын
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 5 жыл бұрын
Cool, thanks for watching. I haven't used IB in 5 years, so code has always been easy and familiar.
@fredericbontemps6569
@fredericbontemps6569 5 жыл бұрын
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.
@digvijaygida7388
@digvijaygida7388 4 жыл бұрын
How to using SwiftUI remote notification and notification on a detail screen open?
@bratz2
@bratz2 5 жыл бұрын
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 5 жыл бұрын
Indeed, I was just trolling. I will most likely buy both a Mac Pro and xdr display when they become available.
@mobilestar6575
@mobilestar6575 5 жыл бұрын
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 5 жыл бұрын
I think storyboards is dying and will be deprecated when SwiftUI is getting more popular
@mobilestar6575
@mobilestar6575 5 жыл бұрын
@@HungNguyen-oz1jc i think so,
@aravinthroshan6500
@aravinthroshan6500 5 жыл бұрын
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.
@stevenen8
@stevenen8 5 жыл бұрын
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 5 жыл бұрын
I think it does, you just have to apply some tricks
@hubrismaxim
@hubrismaxim 5 жыл бұрын
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.
@martinacatherine88
@martinacatherine88 5 жыл бұрын
How would you compare this to Flutter?
@andrejkling3886
@andrejkling3886 3 жыл бұрын
Gratitude Brian....
@Dennisvm82
@Dennisvm82 5 жыл бұрын
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
@Am1rFT
@Am1rFT 5 жыл бұрын
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 👍🏻
@stevengao8345
@stevengao8345 5 жыл бұрын
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.
@tomtucker8466
@tomtucker8466 2 жыл бұрын
how would you make it so that each of those has its own navigation link the goes to its own view
@scthief4421
@scthief4421 3 жыл бұрын
For those who who stuck at the forEach loop it is ForEach(users, id: \.id) { user
@40tutur
@40tutur 5 жыл бұрын
Will the viewControllers disappears ??
@checkupapp
@checkupapp 5 жыл бұрын
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 5 жыл бұрын
Functionality of the app is still front-end. Backend is the server side.
@Vyacheslavskiy
@Vyacheslavskiy 5 жыл бұрын
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?
@toastrecon
@toastrecon 5 жыл бұрын
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 5 жыл бұрын
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.
@MattiaRighetti
@MattiaRighetti 5 жыл бұрын
Straight question, is this new framework gonna make you switch from programmatically coding the UI?
@LetsBuildThatApp
@LetsBuildThatApp 5 жыл бұрын
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.
@Ebadd9
@Ebadd9 3 жыл бұрын
At 12:00 change ForEach(users.identified(by: \id)) to ForEach(users, id: \.id) and it works.
@ashokmurthy7831
@ashokmurthy7831 3 жыл бұрын
For Xcode 12.1, the "ForEach" syntax now becomes : "ForEach(users, id: \.id) { user in ....". Thx for a great tutorial.
@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.
@josuegisber8150
@josuegisber8150 4 жыл бұрын
Quick question: why not using List(0 ..< 5) { item in user) } ? look easier to me.
@isaacclark9825
@isaacclark9825 5 жыл бұрын
The LBATools materials you developed. Doesn't this new stuff make that obsolete?
@LetsBuildThatApp
@LetsBuildThatApp 5 жыл бұрын
LBTATools works great for standards UIKit apps still.
@isaacclark9825
@isaacclark9825 5 жыл бұрын
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.
@caprapaditii
@caprapaditii 5 жыл бұрын
With SwiftUI, codding will be similar to a HTML basic
@alihodroj9559
@alihodroj9559 5 жыл бұрын
Răzvan Capră more like flutter chained widgets
@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.
@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
@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.
@SAS3.1
@SAS3.1 4 жыл бұрын
List { here is an error showing me Contextual closure type '() -> _' expects 0 arguments, but 1 was used in closure body please help me...
@theraybae
@theraybae 4 жыл бұрын
I had the same problem and it looks like it is deprecated. Google searched "SwiftUI identified" and it looks like the you'll have to change it to: ForEach(users, id: \.id) instead of ForEach(users.identified(by: \.id))
@tejassethi9319
@tejassethi9319 4 жыл бұрын
Can you please make a video on how to make a music player in swift ui.
@menteb
@menteb 5 жыл бұрын
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 5 жыл бұрын
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
@michaelstamper5434
@michaelstamper5434 5 жыл бұрын
has anyone figure out how to do webview
@UnFuryYY
@UnFuryYY 5 жыл бұрын
intro song?
SwiftUI Fetching JSON and Image Data with BindableObject
22:21
Lets Build That App
Рет қаралды 45 М.
SwiftUI: Facebook Complex Layouts - Horizontal Scroll View
32:54
Lets Build That App
Рет қаралды 54 М.
Неприятная Встреча На Мосту - Полярная звезда #shorts
00:59
Полярная звезда - Kuzey Yıldızı
Рет қаралды 7 МЛН
MEGA BOXES ARE BACK!!!
08:53
Brawl Stars
Рет қаралды 35 МЛН
Sigma Girl Past #funny #sigma #viral
00:20
CRAZY GREAPA
Рет қаралды 32 МЛН
100+ Linux Things you Need to Know
12:23
Fireship
Рет қаралды 114 М.
SwiftUI Masterclass: Build To Do List App
2:42:49
iOS Academy
Рет қаралды 106 М.
SwiftUI Reactive Intro: State Management and Bindings
18:41
Lets Build That App
Рет қаралды 28 М.
SwiftUI: Presenting Modals and Bindings with Callbacks
25:17
Lets Build That App
Рет қаралды 25 М.
Performance between LazyVStack, VStack and List #SwiftUI
8:09
Swift and Tips
Рет қаралды 9 М.
SwiftUI - How to do Navigation in your Swift UI app
41:58
CodeWithChris
Рет қаралды 79 М.