Awesome video. There are way too many people posting "tutorials" that only show you how to display simple text on screen. This definitely takes it a step further. Thanks!
@sokn1fe4 жыл бұрын
Some things at around 18:30 have changed I used this to get the same output: ScrollView(.horizontal, showsIndicators: false){ HStack(alignment: .top) { ForEach(self.drinks,id: \.name){ drink in DrinkItem(drink: drink) .frame(width:300) .padding(.trailing, 30) } } }
@suryachappidi33374 жыл бұрын
what about the identified in list at 23:16
@TheRuthlessEAZY4 жыл бұрын
thanks for sharing man
@sokn1fe4 жыл бұрын
@@suryachappidi3337 List(categories.keys.sorted(),id: \String.self){key in DrinkRow(categoryName: "\(key) Drinks".uppercased(), drinks: self.categories[key]!)
@sokn1fe4 жыл бұрын
@@TheRuthlessEAZY happy to help :)
@mgambusch4 жыл бұрын
dude you just saved my day:D
@forrestanderson28855 жыл бұрын
Note to anyone that is taking this tutorial. Xcode has changed quite a bit since Brian posted this and there are some things that will throw errors. I am currently running Xcode GM_2 and one of the issues I am having is with 'identified'. That should be changed to: List(categories.keys.sorted(), id: \String.self) { key in ... also there is a problem with the navigation. If you click on one of the images it will not take you to the detail view, but if you click on or below the Category name it will trigger all of the associated images. This is a bug and I am still trying to figure out how to resolve it - I posted here on StackOverflow: stackoverflow.com/questions/57981167/swiftui-navigationlink-not-triggered-in-correct-location - check there to see if a solution has been posted.
@TriMontana5 жыл бұрын
Good comments.
@azizawada53034 жыл бұрын
I'm getting the following error: Static member 'leading' cannot be used on instance of type 'HorizontalAlignment', do you have any idea how to solve it?
@mayrasmora92204 жыл бұрын
@@azizawada5303 In the DrinkRow.swift I was able to fix that error by fixing the "ForEach" from ForEach(self.drinks.identified(by: \.name)) to ForEach(self.drinks, id: \.name)
@azizawada53034 жыл бұрын
@@mayrasmora9220 I made this change, but I'm still getting the same error in the DrinkRow.swift and DrinkItem.swift.
Best part about this tutorial is the sound of birds in the background. Do you always have birds in your backyard whenever you're working?
@bahdmansaul5 жыл бұрын
As an Intermediate/Senior Level Backend dev, this was a very straight forward and palatable introduction to SwiftUI. Thanks for your contribution!
@johnysnowy355 жыл бұрын
Thanks for the quick intro to SwiftUI. It would be really helpful if you provide a starter project for your tutorials that includes the assets (images/json/helper function).
@siddredkar81854 жыл бұрын
Thanks Brian for such wonderful tutorial ,this is my first swift UI tutorial .early i have the basic and basic idea about swiftUI but this gives a preety good idea to overall understand what swiftUI actually it is and how it will works ,pretty interesting to learn from ur tutorial.
@Decatilinae5 жыл бұрын
Thanks Brian... can you go further....Like how to build this app with a DB on Firebase with SwiftUI?
@TrillionWatts5 жыл бұрын
I to would like to see this. I'd gladly donate or become a Patreon for this tutorial @Brian
@DannyBoy4434 жыл бұрын
I'm learning Swift now, from Python and some other languages. And I love the way this looks in XCODE. It's how code should look. C# looks like this.
@sharukmsd11 ай бұрын
OMG!!! OMG!!! My brain is gonna explode. That's too complex....
@iambenmitchell5 жыл бұрын
For the new beta change "ScrollView(showsHorizontalIndicator: false)" to "ScrollView(.horizontal, showsIndicators: false)"
@OrAssraf5 жыл бұрын
It's still in the center and not at the top
@AvenCode5 жыл бұрын
the good hint is .horizontal - it doesn't scroll without it!
@azizawada53034 жыл бұрын
A A 2 minutes ago I'm getting the following error: Static member 'leading' cannot be used on instance of type 'HorizontalAlignment', do you have any idea how to solve it?
@suryachappidi33374 жыл бұрын
@@azizawada5303 did you get any solution for it?
@abcd1239064 жыл бұрын
Thank you!
@tityseptiani85845 жыл бұрын
This is my first time seeing how the SwiftUI works as I haven't touched swift again after I found Flutter. But, this thing got me really excited. It seems like things will be easier with SwiftUI. I really like building my UI by codes so SwiftUI looks a lot sexier to me.
@TheoInvest5 жыл бұрын
hello can you put the link to download the Asset and Json files? Thank you 🙏
@Mahadev-x7u4 жыл бұрын
Thank you very much for your lesson.... All the Best for you
@HisMajesty995 жыл бұрын
Hey Brian, I loved the tutorial, but could you please post a link to the assets and json used please. It would make following along with the video much better. Thanks!
@Nik66445 жыл бұрын
His Majesty just do apples own tutorials. He basically just copied it
@MohammedAraby4 жыл бұрын
Nice tutorial and excellent explain for every step
@FaiDaTe..5 жыл бұрын
Hello can you make an example with swifh ui similar to this with the difference of viewing a video inherent in the context? Thanks you are a great teacher !! Excellent
@reddytocode5 жыл бұрын
16:50 change the Foreach to: Foreach(self.drinks, id: \.name){
@ZhouHaibo4 жыл бұрын
Why not just the Foreach(self.drinks), what is the different?
@mounirasalhi68294 жыл бұрын
it's working now .. thnk U
@kuzaxe4 жыл бұрын
Thanks for this! Fixed the error.
@nikbelikov4 жыл бұрын
Very cool! Thank you! This video gives a basic idea. And if SwiftUI is changed - it's not a problem :)
@OurPastSecrets5 жыл бұрын
So dark mode automatically switches apps with no coding to black with white text?
@waveboardstyler4 жыл бұрын
If you use .primary and .secondary it does, I don’t think it does when you specify .white for example
@Danyil-ip3ll2 жыл бұрын
Thank you Brian.Keep up doing this!Hello from Ukraine 🇺🇦!
@andronickmartusheff40363 жыл бұрын
updated format if you're running into issues with the "identified by" lines try this format ---> List(categories.keys.sorted(), id: \.self) {key in.....
@aliyukamilu15015 жыл бұрын
please how did you create the .json file.
@jadsonmedeiros68155 жыл бұрын
Hello, could you make a video explaining how to use size classes with swiftui? will it be that to create a universal app with different layouts for iPhone and iPad have to use multiple if to detect the device?
@Killdead145 жыл бұрын
I'm having a problem, video time -> 19:50. In the line "ForEach (self.museums.identified (by: \ .name))" I changed to use in my case. This error appears: Type of expression is ambiguous without more context
@iambenmitchell5 жыл бұрын
Yes, this tutorial is broken now. Use beta 2
@Killdead145 жыл бұрын
Ben, thank you and i have beta 2
@w0mblemania5 жыл бұрын
This was very good. Thank you Brian. A query: it seems that the detail view doesn't need to be in a list. (That would also remove the redundant separator line). Also, the load method could be an extension on Bundle, instead of being a free-floating function. Also, the data model should probably refactored out in to its own type, and would provide the dictionary, so that Views don't have to do any thinking. Cheers.
@@iambenmitchell Actually "it's work" has renamed to "doesn't work"...))
@iambenmitchell5 жыл бұрын
@@DimNovo Yeah, there's a lot of bugs. Use Xcode Beta 2. I have uploaded the project here: github.com/MrBenFTW/CoffeeDBApp
@t3ix895 жыл бұрын
@@iambenmitchell Thanks, but have this error "Static member 'leading' cannot be used on instance of type 'HorizontalAlignment'", an idea ?
@iambenmitchell5 жыл бұрын
@@t3ix89 Did you ever fix it?
@handmade835 жыл бұрын
Great video. How did you learn all of this?
@omgawdhax5 жыл бұрын
Thanks Brian, I'm loving these SwiftUI courses all over KZbin. Quick question: At 24:10 should we use [unowned self] for the closure to prevent memory leaks like we do in closures with Swift, or is that handled somehow in SwiftUI? Any ideas? Cheers!
@artemstrekalov63335 жыл бұрын
help me pls on 8:17 DrinkItem(drink:drinkData) I have an error Cannot convert value of type 'Data' to expected argument type 'Drink', I did everything same, but on this step just error
@kvaliantis5 жыл бұрын
Can we have the link of the assets please?
@stressfree97804 жыл бұрын
If you pay me! Or else no
@kvaliantis4 жыл бұрын
@@stressfree9780 ok no
@stressfree97804 жыл бұрын
@@kvaliantis Ok fine- be that way
@vatsalkulshreshtha60485 жыл бұрын
NavigationButton is depracated in beta 5, instead I use NavigationLink... the DrinkRow is not clickable in my case whole scrollview is clickable and then due to forEach loop the detailView opens three times What to do?
@mrcattaable5 жыл бұрын
have you managed to solve this?
@vatsalkulshreshtha60485 жыл бұрын
Haiducu' no
@vatsalkulshreshtha60485 жыл бұрын
@@mrcattaable no! \
@ravingrabidsq5 жыл бұрын
@@vatsalkulshreshtha6048 On my way to find solution, got anything?
@appleblog37765 жыл бұрын
Great Tutorial! Thanks!
@marlokessler5 жыл бұрын
Awesome how you handle Swift and SwiftUI!!!
@nadiasiraniadev94525 жыл бұрын
Thank you for this very useful tutorial
@alswynnjovepascual82294 жыл бұрын
Say , i want to use this UI, is there anyway to add a create/plus button to generate a “new card”
@mrcattaable5 жыл бұрын
since beta 5, I can not navigate to the DrinkDetail, any suggestion?
@rabihelias78485 жыл бұрын
Great tutorial man !!!
@codedaily88615 жыл бұрын
Seems that the identified(by:) is depracated in beta 5, how can I write the List function for the Home view?
@danielillana76385 жыл бұрын
here it is List (categories.keys.sorted (), id: \ String.self) {keys in
@derekxiao82655 жыл бұрын
thank your wonderful job
@alperenakyuz61585 жыл бұрын
Excellent tutorial. Thank you :)
@lowskill48665 жыл бұрын
Pretty cool video, thank's
@HisMajesty995 жыл бұрын
Any idea what this error is: '(Edge.Set) -> _ModifiedContent' is not convertible to '(Edge.Set, Length?) -> _ModifiedContent' (aka '(Edge.Set, Optional) -> _ModifiedContent')
@pickemparty5 жыл бұрын
Whats the point of the default ContentView.swift file when the project is created?
@aliyukamilu15015 жыл бұрын
Thank you for the tutorial
@andrm884 жыл бұрын
36:23 NavigationButton has changed to NavigationLink
@badakml73665 жыл бұрын
ohh man, cant wait for the catalina release, i want to use that preview heheh
@lakshgupta6875 жыл бұрын
Your luck. Catalina just hit the market.
@ridewithsingh3854 жыл бұрын
Testing your app on the actual device doesn't apply the Color Assets for light and dark appearance. Do you know why? light and dark appearance works great in the simulator but not on the actual device.
@crapio994 жыл бұрын
Hi! I was trying to configure the DrinkITem view but it is giving me an error cannot preview in this file. What do I do????
@feededandrea4 жыл бұрын
same here
@anonymouswhite58454 жыл бұрын
Guys how did you made in DrinkItem.swift : static var previews: some View { DrinkItem(drink: drinkData[0]) } I am getting an error that says: Cannot convert value of type 'Data' to expected argument type 'Drink'
@mickaellutin25914 жыл бұрын
someone can explain me the deference between using VStack and the Main.storyboard?
@DC4TH5 жыл бұрын
I got a question... is optimal to use the "ForEach" SwiftUI method in order to render all the elements, it has the optimization of the, for example, reuseds cells of UITableViews?
@christophschmitt1145 жыл бұрын
Hi Brian, what about a design pattern like MVC. Is it still usefull with SwiftUI? In your example the view knows the model.
@matthewross6115 жыл бұрын
How would something like this work with Core Data? and how would it work to edit the JSON file if you were looking at a local database kind of approach?
@danielillana76385 жыл бұрын
Hello, when I want to go to the DrinkDetail, with NavigationLink, when I touch the image it does not change my view, but if I touch in the cell it changes me but it happens to me through all the values of the ForEach loop, what solution can I do
@ravingrabidsq5 жыл бұрын
Did you find any solution?
@series25a4 жыл бұрын
Guys i cant even try to test the sample of the completed app? Can't import app and has errors about some id or permissions...
@rgenericson53615 жыл бұрын
Starting on it now! thx!
@jeanpaulhernandez13635 жыл бұрын
Hello sr, i am getting a crash error when i try to load my canvas preview for the drinkItem.swift file. I am using your content as a template for my own app but for some reason i am getting and error in the last line of the data file, how can i fix it
@TheRedEagle-05 жыл бұрын
Quick Question, how would I go about making it print out the row in a specific row. For example, make the Hot Section first and the Cold second.
@-_--px7em4 жыл бұрын
new xcode 12 beta showsHorizontalIndicator replace it with -> .horizontal, showsIndicators: fals
@rajashekargangarapu42215 жыл бұрын
I have error : Value of type '[String]' has no member 'identified'
@forrestanderson28855 жыл бұрын
You need to change it to: List(categories.keys.sorted(), id: \String.self) { key in
@PoopStyleGaming5 жыл бұрын
How (not) to ask a technical question - kzbin.info/www/bejne/a2TdnHWsgZmNeJY
@DenizYoshimito5 жыл бұрын
26:37 min -> DrinkDetail(drink: Drink) FAILED -> to many Arguments as Parameter. How can i fix this problem? And if i rename my Content.swift in Home.swift it is failed to
@samsonlohasaptawee5315 жыл бұрын
DrinkDetail(drink: drinkData[0])
@DenizYoshimito5 жыл бұрын
@@samsonlohasaptawee531 sorry i forget my params. if i write DrinkDetail(drink: drinkData [3]) my Error: argument passed to call that takes no arguments
@heestand_xyz5 жыл бұрын
Epic tutorial!
@MohammedAraby4 жыл бұрын
but I have issue when I insert the data in drinkItem swiftui no review are coming and saying crushed
@pierre13604 жыл бұрын
I'm not getting the autocompletes that he's getting and my previewer fails when I try to add the drink param to the drinkItem struct
@Nirvananashreal5 жыл бұрын
.identified(by: \String.self) part seems to be deprecated. Idk but my Xcode won’t use it for some reason
@seantan4702 Жыл бұрын
is this consider complex Ui already?
@mmcanhaoable5 жыл бұрын
why dont you provide the files you use on the tutorial?
@jrgibson5 жыл бұрын
Why don't you pay for the files used on the tutorial?
@dipakmakwana56064 жыл бұрын
@@jrgibson In Market, there are so many videos are available, those provide even source code also. And You are asking for payment that is very ridiculous.
@jrgibson4 жыл бұрын
@@dipakmakwana5606 Do you want to try constructing a sentence in English that is correct? If you don't like the videos, you don't have to watch. Putting the files behind a paywall allows Brian to make money from the work he has put into these videos that he is giving away for free -- Don't you think he should be paid for the work he does, or do you expect everyone to work for free?
@zoolander21055 жыл бұрын
In the released version of swift, the identified block is not working :(
@OrAssraf5 жыл бұрын
I am not able to use the load() on the 7:46 I have an error that says: Use of unresolved identifier 'load'; did you mean 'laod'?
@BrianAdvent5 жыл бұрын
Seems there is a typo in your call
@iambenmitchell5 жыл бұрын
@@BrianAdvent SwiftUI has changed a lot since you uploaded this. Please could you do a update video because I have been trying to fix it for the last 2 weeks but nothing.
@911SuperGT5 жыл бұрын
hey guys, i need some help here. i just ordered a mac so that i could start learning to code for iOS. a long time ago, i learned objective-c to get to know a bit about iOS dev. so in my case here, if i want to get into iOS again with the latest technologies, should i be starting by this tutorial and ignore all the old resources used on Swift before SwiftUI ?
@BrianAdvent5 жыл бұрын
Hi Ramy, SwiftUI is cool and already quite powerful. However, at the moment you still need to have basics knowledge about UIKit.
@Evolinox5 жыл бұрын
24:11 I keep getting the Error that "Value of type '[String]' has no member 'identified' "! How can I fix this??
@waterfall99315 жыл бұрын
List(categories.keys.sorted(), id: \.self)
@fieb30515 жыл бұрын
I created a JSON-File which fits the conditions: www.dropbox.com/s/sc1v9h064bsm1de/drinks.json.zip?dl=0
@mustafaihab93895 жыл бұрын
Amazing 🙏
@toanuk5 жыл бұрын
Hi Brian, It is a great video, but It is hard to follow, Can you help to set up data with out Jason file. Can you please set up core data model for next video. look forward for next video as CoreData model.
@moridinbg5 жыл бұрын
Great tutorial, but that was a ridiculous number of ads!
@jrgibson5 жыл бұрын
How else do you think he's supposed to pay for the work he does....?
@aisanaK4 жыл бұрын
Ivan Dilchovski this is the stupidest co,,eat i have ever seen. a free 40 min tutorial with a few ads to be able to get some money this ads literally take 5 seconds to watch
@mariaangelxoxo75795 жыл бұрын
How do I fix this error. value of type ' string ' has no member 'identified'
@bahdmansaul5 жыл бұрын
Foreach(self.drinks, id: \.name)
@danielwatson65295 жыл бұрын
I actually Really love this Tut, it has helped me loads., i didn't actually follow directly tho, as I used an array rather than loading from a Json. Can anyone point me in the right direction for my next challenge, using core data, rather than json or an array, that a user can add ingredients etc.
@nitramluap5 жыл бұрын
This is all lovely... but I'm having a hard time finding a way to link a UI designed in SwiftUI with a CoreData data model. Swift UI seems to be good for simple data structures but that's about it. I hope this changes.
@amit19220035 жыл бұрын
Thank you so much🙏 I will definitely have a look when I wake up!
@xushnudkeldiboyev53934 жыл бұрын
so you woke up!? or still sleeping bob
@amit19220034 жыл бұрын
Xushnud Keldiboyev hahaha I guess it’s a type but I can’t remember😅
@iOS_Developer_Swift4 жыл бұрын
youryr code is not working on latest verison
@platin21485 жыл бұрын
Does anyone know what iig files are used for?
@TArsVEVO5 жыл бұрын
Can I have your json and assets please ?
@iambenmitchell5 жыл бұрын
pastebin.com/ajYzHwne
@anlumithe46165 жыл бұрын
The Scroll View is not working can somebody pls explain ??
@kareemjeiroudi19643 жыл бұрын
So no assets unless you donate?
@Awesome奥深5 жыл бұрын
looks good
@zachcelaya33725 жыл бұрын
My Xcode keeps crashing with no explanation. I made the json decoder exactly like the one in the video but it keeps giving me a dispatch que error and crashing.
@Evolinox5 жыл бұрын
Ive got the same Error!
@bahdmansaul5 жыл бұрын
Sounds like you could be encountering an infinite recursion. Make sure the program can explicitly escape every statement.
@javakian15 жыл бұрын
Hello, I have one error, just opening your code in HomeView.swift.
@javakian15 жыл бұрын
See my errors, please download them, www.OpticalAutomation.com/CoffeeDBApp.zip
@techdistribution1684 жыл бұрын
Hi brother. How to start build successful KZbin channel like you? Could you show me some tips? Thanks.
@jesusfortuna68504 жыл бұрын
Eres el mejor, I love u
@chakrichakram15464 жыл бұрын
Will you be teaching SwiftUI basics?
@BrianAdvent4 жыл бұрын
I just released a course on Swift UI: www.udemy.com/course/build-apps-with-swiftui/?couponCode=KZbinAPRIL
@danielillana76385 жыл бұрын
Hey Brian, I loved the tutorial, but could you please post a link to the assets and json
@anonymouswhite58454 жыл бұрын
If someone did finish the latest version of this project can you share it please?
@shayaknandi38384 жыл бұрын
Hey, are you able to use this video to create the app? Will the tutorial work for today's swift?
@yolo333kadepandxmand4 жыл бұрын
github.com/davidkubik98/CoffeeDB updated version thanks to David Kubik
@taoapps56374 жыл бұрын
@@yolo333kadepandxmand Thank you
@Shqtucke5 жыл бұрын
I have the new xcode beta and it's not responding. It won't open at all. It was fine yesterday. Any suggestions???