Тёмный

SwiftUI - How to do Navigation in your Swift UI app 

CodeWithChris
Подписаться 601 тыс.
Просмотров 80 тыс.
50% 1

Опубликовано:

 

29 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 220   
@CodeWithChris
@CodeWithChris 5 лет назад
QOTD ⚡Did you install Xcode 11 or macOS Catalina beta on your machine? Let me know by leaving a comment!👇 Kick start your own app with my free 7 Day App Action Plan ➡️ bit.ly/7dplan
@elzoguarnieri3207
@elzoguarnieri3207 5 лет назад
No I have not yet. I’m actually going through your courses and my question is: shoutI stop and start studying Swift UI or keep going through the courses?
@CodeWithChris
@CodeWithChris 5 лет назад
If your focus is to make an app for iPhone only, the course is still 100% valid because Swift and SwiftUI are 2 different things. Swift will still be used to write the brain of the app. Now SwiftUI is the new kid on the block that allows you to skip the storyboard to make your app cross platform from iPhone to iPad and to Mac! I don't think Apple introduced Swift 5.x to trash it 3 months later with SwiftUI. Everything you still learn now and tomorrow will still be useful ! @AdrienVillez
@ipioneerit7755
@ipioneerit7755 5 лет назад
@@CodeWithChris to show a title on the list, put the .navigationBarTitle on the actual list within the NavigationView
@marymuthonimarete7440
@marymuthonimarete7440 5 лет назад
I did yesterday and I am trying to follow your tutorial. Thanks for helping us Chris, with these tutorials.
@braninpodolski7862
@braninpodolski7862 5 лет назад
Love SwiftUI. For a complete beginner to coding, this is easier than anything before!
@CodeWithChris
@CodeWithChris 5 лет назад
Glad you feel that way, for others it's a bit scary! @AdrienVillez
@DJPeachUK
@DJPeachUK 5 лет назад
Awesome video again! Would love to see parsing the json data from a server rather than having it local.. Keep up the great vids! 🙌🏻
@CodeWithChris
@CodeWithChris 5 лет назад
Yes, we will work our way from simple to more complex with this series! @AdrienVillez
@AM-gt9uo
@AM-gt9uo 3 года назад
Thank you so much for this. This filled a few gaps that I couldn't get from the official tutorial, especially the use and syntax of closures to initialise a List was completely random when I first looked at it.
@CodeWithChris
@CodeWithChris 3 года назад
Glad to know this, Arjun! All the best and keep on having fun! -Arthur
@wesleyduits1515
@wesleyduits1515 5 лет назад
Hi Chris, I wanted to try SwiftUI as soon as Xcode11 came out. Only it didn't work without OSCatalina, I couldn't wait to try SwiftUI so i installed my first beta on my MBP. I made OSCatalina run on a USB-stick, you never know. It runs good but I can't run Xcode files from my desktop. My files have to be put in a different folder. That took me a while to find out, thanks to the mighty internet. I started learning Swift from Swift 3 so I am not new but definitely not a pro. SwiftUI puts me back a few steps. Your tutorials help me a lot, keep it up.
@CodeWithChris
@CodeWithChris 5 лет назад
Thanks for your support! Glad you found the tutorials helpful, It means a lot! -Kat
@srram
@srram 4 года назад
identified(by:).. is deprecated now. The change I made was List(landmarkData, id: \.id). The rest stayed the same
@CodeWithChris
@CodeWithChris 4 года назад
Thank you for the contribution, I'm sure it will help some people who may have read your comment :) - Francis
@TheOnlyHelix
@TheOnlyHelix 4 года назад
This took me a while to figure out, I should've looked at the comments first!
@thatomathibe2327
@thatomathibe2327 4 года назад
I tried this, but it's still not working.
@vin5718
@vin5718 4 года назад
Advised to still check Apple's tutorial after or while watching the explaination, some function had changed, both in how to use them and the name as well. Might get confused if you are trying this out in 2020
@CodeWithChris
@CodeWithChris 4 года назад
Hey, thanks for mentioning that! - Kat
@nihalchaudhary1090
@nihalchaudhary1090 5 лет назад
great sir plz do not stop to make such tutorial i m your regular student ,its help me a lot thank you ...love you sir
@CodeWithChris
@CodeWithChris 5 лет назад
Thank you for all your support! 🙌 -Kat
@zachdenney
@zachdenney 5 лет назад
I'm running beta software on my MBP, watch, and phone-- definite bugs, but tolerable at the moment. really appreciate your tutorials as i learn swift. thank you !
@CodeWithChris
@CodeWithChris 5 лет назад
The Betas are less deadly than they were like 5 years ago! Good luck on the new SwiftUI projects! @AdrienVillez
@bodyhanger7137
@bodyhanger7137 5 лет назад
I installed Xcode 11 but not Catalina. I’m gonna install it on a different partition Chris, that way it does not interfere with my main OS. Later, when it’s officially released, I can reclaim the space used when I install Catalina over Mojave and Xcode 11 over top of Xcode 10. Hope that made sense mate. Thanks for these tutorials in SwiftUI Chris, the more I work with it the more I’m liking it. Definitely a game changer..👍👍👍
@devhopes
@devhopes 5 лет назад
Awesome video :-). I installed the Betas on my machine and so far so good :-). Keep on keeping on
@CodeWithChris
@CodeWithChris 5 лет назад
Hey Liz, I had my doubts too but I gotta say, they’re working better than I though haha
@curt8806
@curt8806 4 года назад
swift is the most convoluted programming language ever
@CodeWithChris
@CodeWithChris 4 года назад
Oh I see, thanks for sharing your opinion. :-) -Arthur
@curt8806
@curt8806 4 года назад
CodeWithChris hey Chris. Can you show how to do the same thing if the Json file is obtained from an http post request?!
@catneedslogic9836
@catneedslogic9836 2 года назад
Hey Chris can you make a video on how to make different scenes per say for very new beginners. You do a really good job explaining, you're a serious inspiration to me! Wish I had a teacher like you Edit: What I mean is like how to have a start screen and then something else.
@CodeWithChris
@CodeWithChris 2 года назад
Hello, feel free to post your suggestion here: app.productstash.io/codewithchris#/ideas. Thanks for learning with us! -Arthur
@Abbici
@Abbici 5 лет назад
Nice to see all your examples. Have one explain to select a bluetooth attachment? Thank you.
@CodeWithChris
@CodeWithChris 5 лет назад
Hello, sorry but there is no video or tutorials about "file sharing", maybe you can check articles online like this one medium.com/if-let-swift-programming/managing-files-in-ios-dfcdfdc1f426 - Francis
@Abbici
@Abbici 5 лет назад
@@CodeWithChris Thank you and sorry for the bother
@nelglezmusic
@nelglezmusic 5 лет назад
Awesome tutorial!
@CodeWithChris
@CodeWithChris 5 лет назад
Thank you! @AdrienVillez
@jeffCyberCafe
@jeffCyberCafe 5 лет назад
fixed it I had to read the Apple Doc. I had to use .resizable() and .frame
@CodeWithChris
@CodeWithChris 5 лет назад
If you got stuck and went to the Doc, well you are now a Pro! @AdrienVillez
@ivarara
@ivarara 3 года назад
Great lecture thanks, I learned a lot
@CodeWithChris
@CodeWithChris 3 года назад
Yes, awesome to know this, Ivar! Keep on going! :-) -Arthur
@jeffCyberCafe
@jeffCyberCafe 5 лет назад
landmark.image(forSize: 50) doesn't compile error saying "none function"////// the image shows but it's big = landmark.image. I recently installed Xcode11 wondering if a different name for "forSize:"and forSize Int doesnt show in image drop box
@jeffCyberCafe
@jeffCyberCafe 5 лет назад
Jerome Payne yep I did I’m on Building List and Navigation :) Thank You!!!! For your reply your awesome
@CodeWithChris
@CodeWithChris 5 лет назад
Looks like Jerome took the Payne out of this issue! @AdrienVillez
@icykol
@icykol 4 года назад
@Jerome Payne Thank you!
@kushalpokhrel5188
@kushalpokhrel5188 4 года назад
I jump definition image and compare with his code, mine didn't have func image. I guess forSize is not defined in the project file I downloaded. So couldn't access it.
@giannis6924
@giannis6924 4 года назад
That was awesome thank you so much!!!
@CodeWithChris
@CodeWithChris 4 года назад
You are so welcome! 🙌
@ИльгамЯнбулатов
@ИльгамЯнбулатов 3 года назад
Hi Chris! Thanks for such nice tutorials! Could you please advice - I couldn't find your video you mentioned at 1:07 (App with landmarks) Is it available now somewhere? Thanks
@CodeWithChris
@CodeWithChris 3 года назад
"Hello, yes you should be able to access the updated version of official apple tutorial here developer.apple.com/tutorials/swiftui - Francis"
@kennykim7856
@kennykim7856 4 года назад
Chris, NavigationLink requires me to put a label name..? not just destination:LandmarkDetail, which label should I put it in or is this even a correct NavigationLink data type?
@CodeWithChris
@CodeWithChris 4 года назад
Hello, according to the documentation developer.apple.com/documentation/swiftui/navigationlink it seems it got updated to have a "label" which is also a view, you can just simply label: { EmptyView() }) as a "hack" to make it work - Francis
@lorentmustafa9920
@lorentmustafa9920 4 года назад
Cant seem to fix the problem with landmark.image :/ Any solutions? I have the latest of the apple resource code for this project.
@CodeWithChris
@CodeWithChris 4 года назад
Hello, i would be better to follow the apple documentation of this now because some codes got updated, don't worry its the same project developer.apple.com/tutorials/swiftui/ - Francis
@srzurka
@srzurka 3 года назад
Thanks for all the videos you make. They are fantastic. If you wanted to let the user swipe between each child view (the location view in this case) how would you do that? Going from the list to the detail is great and well supported but it seems like there would be lots of use cases where the user would like to easily go to the next detail/child view without having to go back to the list.
@CodeWithChris
@CodeWithChris 3 года назад
"Hello, you can try adding gestures and save ""previous"" selection so you can trigger the navigation from there, however it should not probably work if you just opened the app and did not make a selection yet and actually navigationview already implements a ""swipe"" feature already, try running it on your phone and try swiping after a selection it should work - Francis"
@srzurka
@srzurka 3 года назад
@@CodeWithChris Thank you!
@DanielBurchfield
@DanielBurchfield 4 года назад
The landmark.image(size: size) parameter no longer exists in the data file. I had to use resizeable().frame() to adust the size of the image.
@CodeWithChris
@CodeWithChris 4 года назад
Hello, yes, this was because because this video was made on the early release of SwiftUI, there have been a handful of changes since then, its best to check documentation and online forums if old code does not work anymore - Francis
@mahtabhasan8513
@mahtabhasan8513 4 года назад
Pretty good to enhance the view interactively - thanks for good demo But still we need to work around swiftui. I am recently started using it and comparing all the time UIKIt. i have gone through your many videos old & semi old.
@CodeWithChris
@CodeWithChris 4 года назад
Yup, we will release more SwiftUI tutorials. Thanks for learning with us! :-) -Arthur
@txbgould
@txbgould 5 лет назад
Chris, do you know if SwiftUI will completely replace all we have learned previously or will we be able to leverage that?
@CodeWithChris
@CodeWithChris 5 лет назад
Swift will never go away. SwiftUI is just the newer way to write UI. You still need Swift to write the logic and the brain of your apps. @AdrienVillez
@shiwanshumishra6378
@shiwanshumishra6378 4 года назад
Hii Chris , i want to make custom URL like a user , input string into the text-field and which is grab from UI and append into my URL domain. after grabbing from the user. I want to open it using button click.
@CodeWithChris
@CodeWithChris 4 года назад
Hello, what should be simple you only need maybe a randomizer for the ""user"", a textfield to get the extra data to append, and maybe webkit or alamofire to open the web address - Francis
@nikaiobishvili6149
@nikaiobishvili6149 5 месяцев назад
Hello, I am new in SwiftUI, but used be a developer in UIKit. I downloaded file from site but the starter file is not full version for starting. :( I wanted to do parallel
@chhatrasalsinghbundela1648
@chhatrasalsinghbundela1648 4 года назад
@Chris I have designed a SplashScreen with SwiftUI because I need to make api calls to my server to refresh's the authToken. So, I need to show the splash screen 1st time onlyAfter showing the splash screen will navigate to home page and the user should not be able to navigate back to splash screen. So, Its like I need to remove to splash screen from view stack after navigating to homepage. Can you help me with that? Reference to any article/video will be helpful. Thanks.
@CodeWithChris
@CodeWithChris 4 года назад
Hello, the splash screen on ios is usually just used to show the app logo, i suggest making your splash screen and just ""present"" it to screen on top of your current ViewController so that you can dismiss it easily afterward and will not leave a trace to nagivate into - Francis
@arshiyasinha4136
@arshiyasinha4136 4 года назад
Could you also do a video on JSON parsing in a Navigation View?
@CodeWithChris
@CodeWithChris 4 года назад
Thanks for the suggestion! It's on our list. :) Kat
@saefurukawa5148
@saefurukawa5148 4 года назад
Hi Chris, thank you for your awesome video !! I have a question. I created similar pages (not exactly the same but the same function) and I noticed that when I navigate to the second page, there is a huge blank on the top of the screen, so it's dragging everything else down. This does not appear if I access straight to the second page without the navigation function. Do you know how to fix it?? Thanks!
@CodeWithChris
@CodeWithChris 4 года назад
Hello, i think its because of the navigation link, maybe it would be better to present it instead using a segue - Francis
@fxizrr
@fxizrr 4 года назад
List initialization updated to August 2020: List(landmarkData, id: \.id) { landmark in LandmarkRow(landmark: landmark)}
@CodeWithChris
@CodeWithChris 4 года назад
Hello, yes there have been quite a few changes since this video was last posted, this video was made way back when SwiftUI was just annouced so its quite early stage. there will probably be some changes in the future as well - Francis
@danielwatson6529
@danielwatson6529 5 лет назад
Hi Chris! thanks for everything so far. I have also been using thise apple Tuts. Although Ive struggled with this one - after the beginning of project, after downloading the project files, all my Apple Developer fields where a mess and I had to copy and paste, and update my Tut 1 files - not the best way but I leaned quite a bit by experimenting with how the program ran as i updated a sheet at a time. However what went wrong? i really dont understand, my apple developer dfetails are fine for tut 1 and are fine when i start with my own projects - but something was seriously wrong - is it a bug with Xcode or am i missing something?
@CodeWithChris
@CodeWithChris 5 лет назад
Hello, we created a forum to help people with the tutorials. Could you share this to our CodeCrew Community codecrew.codewithchris.com/ with more details or screenshots if possible? Thanks!
@pierremarais7669
@pierremarais7669 4 года назад
Hi Chris thanks for the Great videos, what about using a sqlite database within SwiftUI, let us know, thanks
@CodeWithChris
@CodeWithChris 4 года назад
Hello, should be possible to use SQLite is already built-in on the ios app, SwiftUI and storyboard uses the same language swift so its not really any different how you code (unless its UI related) - Francis
@icykol
@icykol 4 года назад
Hi Chris, I am getting this error (@34:48) --> Cannot call value of non-function type 'Image', when I am trying to build CircleImage.swift. And related to that, I am getting this error (@35:45) --> 'Int' is not convertible to 'CGFloat?', when I am trying to build LandmarkDetail.swift (this error was refer to '.frame(height: 300)' OR line 18 in your LandmarkDetail.swift file @35.45). Can you please help?
@CodeWithChris
@CodeWithChris 4 года назад
Hello! Sorry to see you are having trouble. Could you post your question (with code sample and/or screenshots) in our community group here (bit.ly/CodeCrewCommunity). Make sure to check the posting guidelines (bit.ly/CWCHowToAskForHelp) so we can help you the best as we can! Thanks for being a CodeCrew member! -Kat
@pv153-x4c
@pv153-x4c 4 года назад
@@CodeWithChris Having the same problem.
@jackylegs222
@jackylegs222 4 года назад
Hi Chris, I’ve updated my Mac to OS Catalina 10.15. and I’m still having trouble displaying my canvas. It is ticked and shows up on the right and side but appears to time out. Any thoughts on what could be causing this?
@CodeWithChris
@CodeWithChris 4 года назад
Hello, we might need more info to help you with your problem, and also some screenshots, please head on over to codecrew.codewithchris.com for more support - Francis
@Taziamoma
@Taziamoma 3 года назад
Whenever I download the "Building Lists and Navigation" and extract it, the project file in there is "CreatingAndCombiningViews". The layout and information looks different from yours. Do you still have the original for download?
@CodeWithChris
@CodeWithChris 3 года назад
"Hello, you can just check out the tutorial over at the apple website developer.apple.com/tutorials/swiftui/ - Francis"
@akshatvv
@akshatvv 4 года назад
very nice video, thanks !!
@CodeWithChris
@CodeWithChris 4 года назад
Cheers, Akshat! Glad we could help! -Arthur
@ykgreene
@ykgreene 5 лет назад
Another great lesson. Can you teach this same lesson using Swift 5 UIkit.
@CodeWithChris
@CodeWithChris 5 лет назад
Swift 5 is not dead, we can still make UI elements in Swift. @AdrienVillez
@tommytom4443
@tommytom4443 3 года назад
I've never learned how to use Swift, UIKit, or anything like it, I'd only learned c# through Unity. Your tutorials are really helping me out because going through the apple tutorials alone are very daunting and frankly frustrating as I don't know the language
@CodeWithChris
@CodeWithChris 3 года назад
Awesome to know, thank you so much! :-) -Arthur
@newbiegeek8407
@newbiegeek8407 4 года назад
Hey chris can you make a swift cheat sheet about what each modifier does
@CodeWithChris
@CodeWithChris 4 года назад
We have a Swift Cheat Sheet here codewithchris.com/swift-cheat-sheet/ - Kat
@daniphilip777
@daniphilip777 4 года назад
Hello, how can I add a search bar in the app demonstrated in the video?
@CodeWithChris
@CodeWithChris 4 года назад
Hello, maybe you can add a textfield and have a state called searchterm, so anything that you type on the textfield triggers the list to refresh base on the value of the textfield - Francis
@japonska2009
@japonska2009 Год назад
i was wondering, why we never used any @State with properties we created in different views. I though you must put @State var ____ when you make a property in SwiftUI
@MrMrchan1997
@MrMrchan1997 5 лет назад
HEY Chris, when i created the LandmarkRow.swift I can't click the button of resume . The error said that Signing for "Landmarks" requires a development team. Select a development team in the Signing & Capabilities editor. That's mean i need to register an apple developer account and pay $99 for it ?
@MrMrchan1997
@MrMrchan1997 5 лет назад
And also it said that failedToGetInstalledApplicationInfoAfterInstalling
@CodeWithChris
@CodeWithChris 5 лет назад
Hello, it's hard to troubleshoot via YT comments. We created a forum to help people with the tutorials. Could you share this to our CodeCrew Community codecrew.codewithchris.com/ with screenshots if possible? Thanks! -Kat
@amolnikam1840
@amolnikam1840 4 года назад
Please take on session on Combine framework.
@CodeWithChris
@CodeWithChris 4 года назад
We'll get to that Amol. Thanks for the suggestion. -Kat
@ananyamehan3014
@ananyamehan3014 5 лет назад
Hey, I am getting this error --> compiling failed: no type names 'LandmarkRow_Previews' in module 'Landmarks', when I am trying to run the LandmarkRow canvas. Can you please help? Thank you!
@josephching2922
@josephching2922 5 лет назад
Command + Shift + K and then reopen the project. Apple developer forum thread #122341
@therdgf
@therdgf 5 лет назад
Same here. I guess the global variable is not being called
@CodeWithChris
@CodeWithChris 5 лет назад
Might help forums.developer.apple.com/thread/122341 -Kat
@therdgf
@therdgf 5 лет назад
@@CodeWithChris Thank you very much
@ananyamehan3014
@ananyamehan3014 5 лет назад
CodeWithChris Thank you!
@txbgould
@txbgould 5 лет назад
I installed macOS Catalina and Xcode beta 11. Xcode is almost unusable. I can't get a project to load. I can create a new one but I can't open it again once I close and come back to it. macOS Catalina is also buggy (but beta so understand.). MacBook Air won't sleep in Catalina
@CodeWithChris
@CodeWithChris 5 лет назад
During the edit of this video, I had to cut or shorten some bugs and crash yet. Now Chris is using an iMac from 2015 with an OK hardware. Maybe older or smaller hardware will have an even harder time to deal with a beta version. Don't worry, September is close by! @AdrienVillez
@danaililiev7362
@danaililiev7362 4 года назад
On start of your application, if the user is logged in - load some view called HomeView, if the user is not logged in load LoginView, the user should be able to logout at any point, which should again load the LoginView. How would you tackle that in SwiftUI? Note that HomeView is not the initial view, so if you are logged in you actually skip 2 views, InitialView and LoginView and go straight to HomeView. How would you tackle this if the user just logged in and logouts, or logged in, closed the application then started it again and logged out?
@CodeWithChris
@CodeWithChris 4 года назад
Hello, as long as you set your navigationlink it should be fine going from one page to another as long as you tell it to move there - Francis
@danaililiev7362
@danaililiev7362 4 года назад
@@CodeWithChris Do you mean instead of doing dismiss on current view twice I should just navigate directly to where I want? Doesn't that put many views on top of each other (new to mobile programming, sorry for my silly question)?
@ismaakova
@ismaakova 4 года назад
navigationBarTitle should be after List: List {}.navigationBarTitle () 38:08
@CodeWithChris
@CodeWithChris 4 года назад
Hello, thanks for mentioning that. - Kat
@Smellycat093
@Smellycat093 4 года назад
How would I swap out my own firebase data for this data and make it a read/write to list?
@CodeWithChris
@CodeWithChris 4 года назад
Hello, yes you can use firebase in swiftUI you just need to set it up the same way that you set it up for regular storyboard apps via cocoapods, the codes sill be the same as they are using the same library - Francis
@Smellycat093
@Smellycat093 4 года назад
@@CodeWithChris thanks for the reply. How would I parse the firebase data to be represented as you have in this video? Would I still need the data.swift file?
@LKSKO3
@LKSKO3 4 года назад
Hello, I have now learned how to use tab bar controller, but can't solve one thing and that thing is that how to add on the main tab bar controller some label, background or anything I want. Thanks for answer.
@CodeWithChris
@CodeWithChris 4 года назад
Hello, try checking the documentation developer.apple.com/documentation/uikit/uitabbarcontroller and see if there are any properties that you can change - Francis
@aVEzPz
@aVEzPz 4 года назад
I have an imagepicker set up and would like to open a new view when the image is selected.. any ideas on how I might accomplish this? preferably without using navigationlinks
@CodeWithChris
@CodeWithChris 4 года назад
Hello, you can just do a custom pop-up dialog or something that has a UIImage inside so you can just display the image from there and just open it using "present" - Francis
@Lilpiip123
@Lilpiip123 5 лет назад
the LandmarkRow.swift is fucked up for some reason... when i create that file and try to run the preview it just gives me an error
@avneetsingh2010
@avneetsingh2010 3 года назад
Hey Chris... How can we implement side menu in landing page just after login screen and navigate to its items... Without login screen I've implemented but not sure after login screen...
@CodeWithChris
@CodeWithChris 3 года назад
"Hello, yes it should be possible though it shouldn't work since the user hasn't logged in yet - Francis"
@raddemojsovski548
@raddemojsovski548 5 лет назад
Weirdly you have to put the navigationBarTitle inside the closure for NavigationView like this NavigationView { List(users) { user in NavigationButton(destination: DetailView(user: user)) { MyRow(user: user) } } .navigationBarTitle(Text("Title")) }
@CodeWithChris
@CodeWithChris 5 лет назад
Thanks for your input, I will test this out! @AdrienVillez
@icykol
@icykol 4 года назад
Hi Chris, I am getting this error (@20:24) --> Value of type '[Landmark]' has no member 'identified', when I am trying to run the LandmarkList canvas. Can you please help?
@CodeWithChris
@CodeWithChris 4 года назад
Hello! Sorry to see you are having trouble. You should consider posting your question (with code sample and/or screenshots) in our community group that can be found here (bit.ly/CodeCrewCommunity). Make sure to check the posting guidelines (bit.ly/CWCHowToAskForHelp) like that we can help you the best as we can! Thanks for being a CodeCrew member! @AdrienVillez
@davidhedelin7987
@davidhedelin7987 4 года назад
Use this code instead (identified is deprecated in xcode 11 5 and above): List (landmarkData, id: \.id) { (landmark) -> LandmarkRow in
@holycrosscv
@holycrosscv 4 года назад
@@davidhedelin7987 Thanks David, this helps. I still get an error though, "'_' had no member id"
@崔诗敏-s2g
@崔诗敏-s2g 4 года назад
@@holycrosscv Me, too! btw have you solved this problem yet?
@holycrosscv
@holycrosscv 4 года назад
@@崔诗敏-s2g Yeah, this got it working on my project: ``` List(landmarkData) { landmark in NavigationLink(destination: LandmarkDetail(landmark: landmark)) { LandmarkRow(landmark: landmark) } } ```
@modernarts3266
@modernarts3266 5 лет назад
If i was to make a table view in SwiftUI, Would I need a JSON file along with the other locations?
@CodeWithChris
@CodeWithChris 5 лет назад
Hello, it really depends on what you want to display on your tableview, if its just a simple list you can either make it a json file or you can even hardcode it, ideally you just want to plan out what data you want to display first - Francis
@tomcyclope
@tomcyclope 5 лет назад
hey chris, So i tried to install xcode 11 on my macbook air however, i have some issue with the feature canvas. In fact its not appear like it should be. I tried everything but for now, i dont have the answer for this. editor => canvas doesn't work. i think its a bug between xcode 10.2.1 and 11 which are install or maybe doesnt work for macbook air because not enough powerful for this or maybe 13" so too small ... i really dont know.
@CodeWithChris
@CodeWithChris 5 лет назад
Hey Tommy, you can’t see the canvas unless you install Catalina beta unfortunately!
@tomcyclope
@tomcyclope 5 лет назад
@@CodeWithChris ahhh ok. Thank you very much !!!
@glenreidy
@glenreidy 4 года назад
Another difficult one. Here's a beginners question for you. Does SwiftUI use more code than UIKit (with storyboard) so that one page of code looks neater?
@glenreidy
@glenreidy 4 года назад
Gave up just over half way. Too much. Not because of the video but the content in general. I also tried the apple tutorial. It's not making any sense to me yet. I think I'll try something a little easier or I'll just burn out and loose interest in SwiftUI.
@CodeWithChris
@CodeWithChris 4 года назад
Hello, since. SwiftUI relies heavily in coding, then yes it would require more info how to make your app/UI look for cleaner and better, but for making simple design UI then using the default values should be fine for practice - Francis
@abdullahajmal9020
@abdullahajmal9020 5 лет назад
Hey Chris, Does Swift UI use the same syntaxes as programmatic Swift?
@CodeWithChris
@CodeWithChris 5 лет назад
In Swift you have to add the x and y coordinate or an element with its height and width. In SwiftUI it's more or less like a placement. (that's how I see it!) @AdrienVillez
@abdullahajmal9020
@abdullahajmal9020 5 лет назад
@Nathaniel Day Oh ok thanks
@EthanZemelman
@EthanZemelman 4 года назад
The navigation bar title wasn't working because you tried to add it to the NavigationView. You have to add it to the list inside the NavigationView
@CodeWithChris
@CodeWithChris 4 года назад
Hello, thank you for the input, there was also been a lot of changes on this video because this was taken directly from the apple documentation example. There has been quite a few changes since then - Francis
@RyuuzakiJulio
@RyuuzakiJulio 5 лет назад
How about design a custom control with SwiftUI? Like a Knob or something more than List, Images and Text that everyone is doing?
@CodeWithChris
@CodeWithChris 5 лет назад
Hey Julio! Yes, we will definitely continue to explore more of SwiftUI once we are done reviewing what Apple published! @AdrienVillez
@RyuuzakiJulio
@RyuuzakiJulio 5 лет назад
CodeWithChris seems like you can do custom shapes with GeometryReader. But I can’t find the PanGesture to be able to get angles.
@nataliam341
@nataliam341 4 года назад
I have a question: Why are they called swift files if we are coding in swiftui?
@CodeWithChris
@CodeWithChris 4 года назад
Because SwiftUI is just Swift code (behind the scene) and if they had different file extensions, we wouldn't be able to mix them in a project @AdrienVillez
@RichardGetzPhotography
@RichardGetzPhotography 5 лет назад
1:03 you should add this to the card (i) so we can select it. Currently only 'SwiftUI Basics for Beginners (2019)' is there. Actually I do not see 'SwiftUI Full Tutorial' in your video list. Also, the SwiftUI Basics for Beginners (2019) is xCode 11. I hope all your new projects are not predicated on upgrading to a beta app and os?
@CodeWithChris
@CodeWithChris 5 лет назад
SwiftUI has to be recorded with Xcode 11. Now Xcode 11 is gonna come out in less than 3 months so, it's nice to already have recorded with Xcode 11. Regarding the regular Swift and UIKit, it doesn't make a difference. @AdrienVillez
@RichardGetzPhotography
@RichardGetzPhotography 5 лет назад
@@CodeWithChris so all these lessons can be done on the current xCode 10 without the need to using beta software?
@CodeWithChris
@CodeWithChris 5 лет назад
Unfortunately SwiftUI is only available on Xcode 11. I won't be touching SwiftUI very much until X11 gets released officially in Sept. For now, i'm focused on material that can be done on X10!
@suryakoppula1965
@suryakoppula1965 2 года назад
Hi Chris, The Data.swift file is missing in the package, so to get that what can I do?
@CodeWithChris
@CodeWithChris 2 года назад
Hello, kindly post your question on our CodeCrew forum so that our tech support staff can assist you: codecrew.codewithchris.com. Thank you! -Arthur
@arindamsantra8537
@arindamsantra8537 4 года назад
Want more swift ui tutorial
@CodeWithChris
@CodeWithChris 4 года назад
Stay tuned! :) - Kat
@aganeto1
@aganeto1 4 года назад
I cant find the mentioned video previous to this one, called Swift Full Tutorial. Where is it ?
@CodeWithChris
@CodeWithChris 4 года назад
Hello, you might be looking for this app tutorial ru-vid.com/group/PLMRqhzcHGw1ZkH8RuznGMS0NZs0jWQQ5a or this beginners tutorial ru-vid.com/group/PLMRqhzcHGw1b89DXHOVA77ozWXWmuBkWX - Francis
@schlingelgen
@schlingelgen 4 года назад
I’ve seen many tutorials where the NavigationBarTitle is appended one level below the NavigationView - for example in the LandmarkList it would get appended on the closing curly bracket of the List - why is that?
@CodeWithChris
@CodeWithChris 4 года назад
Hello, becuase the navigationBarTitle is an attribute of the NavigationView, so it should be inside (or appended after the bracket). think of it as an attribute of the class like lets say the class is Person and it has a "name" attribute, so to access and set the attribute you should do Person.name. Same logic goes for this but its just a bit longer with more content - Francis
@schlingelgen
@schlingelgen 4 года назад
@@CodeWithChris Many thanks for answering even a year after the video got uploaded!
@TheRsaker14
@TheRsaker14 5 лет назад
Can’t find navigationbutton in swiftui beta 5,6 Can you help ?
@CodeWithChris
@CodeWithChris 5 лет назад
Hello, SwiftUI is fast changing because its in BETA, it seems that NavigationButton is now depreciated and has been replaced by NavigationLink - Francis
@TheRsaker14
@TheRsaker14 5 лет назад
Tnx
@norberthaubner9515
@norberthaubner9515 5 лет назад
I don't know where I keep going wrong but I always get the following error. Cannot preview in this file -- JSON Practice.app May have crashed It musst have something to do with the JSON file, Data file or Decodable file! Any idea what this could be, I can't seem to find an answer anywhere to help. Here is the project on GitHub: github.com/zenocode/JSON-Practice/tree/master/JSON%20Practice Thanks for the help
@CodeWithChris
@CodeWithChris 5 лет назад
Hello, we created a forum for people needing coding help. Could you share this to our CodeCrew Community codecrew.codewithchris.com/ with more details or screenshots if possible? Thanks! -Kat
@norberthaubner9515
@norberthaubner9515 5 лет назад
Thanks for the reply @CodeWithChris
@medichiswq2148
@medichiswq2148 5 лет назад
I am a nuby, that's why I have no idea what to do: updated Xcode to 11 version and found out that canvas is available only on macOS 10.15 (which is Catalina)...should I change Mojave to Catalina or just wait for a miracle update?))
@CodeWithChris
@CodeWithChris 5 лет назад
Hello, if you really want to program SwiftUI then you should really update to catalina, who know if there is even a "miracle update" that will come cuz there wasn't one for swift 5 on Sierra ;) - Francis
@EpicGamerAbhay
@EpicGamerAbhay 5 лет назад
Nice Job😎👍👌
@CodeWithChris
@CodeWithChris 5 лет назад
Thank you! All credits go to Apple, we are just live coding it for you! @AdrienVillez
@nikolaveljic64
@nikolaveljic64 5 лет назад
Hi! Can we use swift ui with storyboard? And how? Like use one view from Swift UI and others from storyboard?
@hcri
@hcri 5 лет назад
UI does not use storyboard. and it is not interchangeable
@laurens2598
@laurens2598 5 лет назад
Did you installed the 10.15 beta on a second partition?
@CodeWithChris
@CodeWithChris 5 лет назад
Hey Laurens, I installed it on a spare MacBook I had! If I only had one machine, I don’t think I would risk it lol
@laurens2598
@laurens2598 5 лет назад
CodeWithChris I’ve done a dual boot on my MacBook and it works very well! And SwiftUI ist awesome!
@alfatrox00
@alfatrox00 5 лет назад
You should put the navigationBarTitle on the List, not on the NavigationView I think Try it
@CodeWithChris
@CodeWithChris 5 лет назад
OK, let's try that, BRB! @AdrienVillez
@hendrin2379
@hendrin2379 5 лет назад
it's really works!
@TheZourop
@TheZourop 5 лет назад
What is the difference between struct and class ?
@jason_bourne17
@jason_bourne17 4 года назад
how navigate back to a specific view A->B->C->D->B
@CodeWithChris
@CodeWithChris 4 года назад
Hello, yes it would be possible to do it you can refer to this stackoverflow answer stackoverflow.com/a/7516468 its possible that might be a bit different codewise but the logic stays the same - Francis
@tomson8780
@tomson8780 4 года назад
14:15 I haven't got forSize func in my code... And when in writing it in I'm getting a error.
@caseynance7318
@caseynance7318 4 года назад
I had the same problem and I figured out if you go to the apple tutorial page it shows you you have to set up the image like this: landmark.image .resizable() .frame(width: 50, height: 50)
@tomson8780
@tomson8780 4 года назад
@@caseynance7318 i check apple documentation and change something and it's working fine
@崔诗敏-s2g
@崔诗敏-s2g 4 года назад
@@tomson8780 Hey another thing I have run into is the List part, in the official document it wrote " id: /.id", but when I wrote in Xcode I got an alert said, "Type '_' has no member 'id'". Have you run into this, too?
@tomson8780
@tomson8780 4 года назад
@@崔诗敏-s2g nope
@崔诗敏-s2g
@崔诗敏-s2g 4 года назад
@@tomson8780 Thanks.
@littlepig3697
@littlepig3697 4 года назад
erm excuse me i cant get the forSize working, can u pls help
@CodeWithChris
@CodeWithChris 4 года назад
Hello! Are you still experiencing this problem? Could you share your question in our community group here (bit.ly/CodeCrewCommunity)? Just check the posting guidelines (bit.ly/CWCHowToAskForHelp) so we can help you the best as we can! Thanks! Kat
@bookmarkmonaco4255
@bookmarkmonaco4255 4 года назад
@@CodeWithChris Hello there, Apple has changed this class. Right now the working code is: landmark.image .resizable() .frame(width: 50, height: 50)
@bookmarkmonaco4255
@bookmarkmonaco4255 4 года назад
Hello there, Apple has changed class. Right now the working code is: landmark.image .resizable().frame(width: 50, height: 50)
@theodorenelson8568
@theodorenelson8568 4 года назад
@@bookmarkmonaco4255 OMG thank you for posting this. Been pulling out my hair trying to change the data.Swift file to match the one Chris is using in this tutorial.
@arsalanhashemi4469
@arsalanhashemi4469 5 лет назад
nice
@aprilsamson8962
@aprilsamson8962 4 года назад
how to get data from database instead of json file?
@CodeWithChris
@CodeWithChris 4 года назад
Hello, most of the time data from an outside database (online) can only be accessed by a JSON return/response, perhaps you are looking for something local like CoreData? ru-vid.com/group/PLMRqhzcHGw1aDYKmCuqXQ_IqpWpJlpoJ3 - Francis
@Sniiigel
@Sniiigel 4 года назад
I think it should be NavigationLink("Title of choice") and not NavigationLink(Text("Title of choice")), but I'm not sure
@CodeWithChris
@CodeWithChris 4 года назад
Hello, there have been some changes (improvements) ever since SwiftUI was released so expect things to be easier or more simple to use, its best to check the documentation for this - Francis
@ayanemay6298
@ayanemay6298 5 лет назад
I feel like apple decided to enter the home by climbing all the the trees and through window, ignoring perfectly working, comfortable door( SwiftUi is totally a mess to me, sure we can memorize a hundred ways to get what we want, but why? when we learn something, we forget something. The old way worked, it did have a preview too, even if it was not live it sure does not make this better for me, this is not like swift at all. Why would they do something like this when they made swift in the first place. So far - I really hope SwiftUi will be only an alternative. this is just a new way to fill our memory with something (
@CodeWithChris
@CodeWithChris 5 лет назад
My first look at SwiftUI was also a big Wow, and I'm still really confused about it... Now, I haven't been coding for a loooong time and I'm focused more on video editing than Xcode so, I can't really say it's hard or complicated since I never put my hands on... Give it a couple of months or even a year and SwiftUI should be more mature then! @AdrienVillez
@mayaa6910
@mayaa6910 4 года назад
Its saying I don't have permission to view it can some one please help me!
@CodeWithChris
@CodeWithChris 4 года назад
Hello, in which part are you getting that error message? - Kat
@mayaa6910
@mayaa6910 4 года назад
@@CodeWithChris at the beginning when I first open the Xcode file and then it says you don't have permission to to access read me or sample code and its not letting me run the previews so im pretty confused
@danialmk8991
@danialmk8991 5 лет назад
How can I get macOS Catalina beta? since Xcode 11 is not fully functional on OS Mojave. pls advise.
@hcri
@hcri 5 лет назад
it is available in the download section for developers. developer.apple.com
@CodeWithChris
@CodeWithChris 5 лет назад
Thanks Robert! @AdrienVillez
@danialmk8991
@danialmk8991 5 лет назад
@@hcri Thanks Robert!
@sheevBL
@sheevBL 5 лет назад
more
@CodeWithChris
@CodeWithChris 5 лет назад
Mooooooooooore!!!!!!! @AdrienVillez
@yoelcera243
@yoelcera243 Год назад
this tutorial was too complicated for someone who is barely starting to code, to me it was a mess how Chris was modifying the archive given by apple.
@CodeWithChris
@CodeWithChris Год назад
We are here to help, if you are brand new to iOS and coding in general, take this 8 Steps Tutorial: ru-vid.com/group/PLMRqhzcHGw1Y5Cluhf7pKRNZtKaA3Q4kg @AdrienVillez
@curt8806
@curt8806 5 лет назад
Wtf did I just watch.
@CodeWithChris
@CodeWithChris 5 лет назад
If you come from Swift, it's a little shock I have to admit! @AdrienVillez
@buck4mt
@buck4mt 5 лет назад
Ha - I'm glad I'm not the only one that felt this way. I thought I was understanding up until this video... and now I feel like "landmark" is the answer to everything, but I have no idea how or why. It is amazing to watch Chris have an error - and then go to the code and comprehend why there was an error and fix it... meanwhile, I'm scratching my head and feeling lost. I guess I'm not ready for this level yet. Hopefully when I circle back, it will make more sense.
Далее
SwiftUI - How To Handle User Input Tutorial
45:45
Просмотров 38 тыс.
SwiftUI Basics for Beginners (2020)
30:53
Просмотров 312 тыс.
ДУБАЙСКАЯ ШОКОЛАДКА 🍫
00:55
Просмотров 3,2 млн
Always Help the Needy
00:28
Просмотров 13 млн
The Complete Guide to NavigationView in SwiftUI
39:18
Просмотров 130 тыс.
Navigation in SwiftUI & iOS 16
18:12
Просмотров 32 тыс.
SwiftUI Tutorial: Navigation, List, Modal, Stacks
20:45
Xcode Tutorial - Step by Step for Beginners
56:52
Просмотров 351 тыс.
SwiftUI Basics Tutorial
1:19:31
Просмотров 400 тыс.
SwiftUI vs UIKit (See UI built 3 different ways)
22:38