Swift Functions - Lesson 6 (2024 / SwiftUI)

Поделиться
HTML-код
  • Опубликовано: 5 фев 2025

Комментарии • 86

  • @CodeWithChris
    @CodeWithChris  2 года назад +3

    👋 Our "Launch Your First App" program will help you build up your iOS skills to publish your very own feature rich app even if you’re a beginner starting from scratch. cwc.to/youtubeoffer

  • @WorldITAcademy
    @WorldITAcademy 2 года назад +14

    A good teacher is a person who enjoys what he teaches. Enthusiasm is infectious.

  • @tarap4570
    @tarap4570 4 месяца назад +1

    I literally left in the middle of my codeacademy course to find some videos that would explain it better. And here I am following your courses very easily. Honestly, you should get in touch with them to help them improve their swift coding course lol.
    I already have a small foundation of JavaScript. But it's nice to have visual and audio explanations (especially with those starter codes when you create a new project). I really am an associative learner, so all the metaphors that you give are amazing for my memorizing! Very grateful to have found your channel.
    Subscribed!

  • @Eportal-bk1tk
    @Eportal-bk1tk Год назад +2

    Chris is a good teacher who is full of infectious energy! Thanks for the wonderful lessons!😄

  • @Mehdir05
    @Mehdir05 Год назад +1

    Very clear explanation. Learned more from this than an entire LinkedIn Learning online course!

  • @giantdworf2026
    @giantdworf2026 9 месяцев назад +1

    I usually look for the same topic on different sources and I can confirm to you that your explanations are clear and easy to follow

  • @michellemorgan6986
    @michellemorgan6986 2 года назад +5

    Chris, thank you so much for this! Your lessons are the best I've seen. They are very simple, yet very well explained, even for advanced programmers who need a refresher.
    Continue the wonderful work you are doing! 👏👏👏❤

    • @CodeWithChris
      @CodeWithChris  2 года назад +1

      Thank you for the kind words, Michelle! Appreciate it! :) - Pat

  • @StephenSams-cm8eq
    @StephenSams-cm8eq 8 месяцев назад +1

    Just now learning Swift and your videos have been super helpful so far! To me it looks like Swift shares some syntax will TypeScript and maybe a little bit with C#.

    • @CodeWithChris
      @CodeWithChris  8 месяцев назад

      Glad you found it helpful! Thanks for watching! - Iñaki

  • @gottafindacoolname
    @gottafindacoolname Год назад +1

    This suddenly became pretty advanced.. I have to many question? What are a and b? could it be g and k?

    • @CodeWithChris
      @CodeWithChris  Год назад

      A and B is just a sample Chris made for the purpose of this video. You can use any laters you want in making names for your project. But if you want to learn more about proper naming conventions, you may want to check this link:
      Naming Conventions For iOS Development
      samuelhepditch.medium.com/naming-conventions-for-ios-development-698691ed3429
      --Joash

  • @19LloydG
    @19LloydG Год назад +2

    An excellent course which taught me a lot, these videos are great 👍

  • @boqoll
    @boqoll 8 месяцев назад

    I understood all the previous lessons, but this lesson was the hardest. Didn`t understand anything, hope it doesn`t get harder than this😣. Will definitely be watching this again and again to understand this

    • @CodeWithChris
      @CodeWithChris  8 месяцев назад +1

      Hi there, we've got a community of learners over at cwc.to/codecrew. I highly recommend joining and reaching out for assistance, especially for any concepts you're finding challenging to grasp. - Iñaki

  • @will_hunt
    @will_hunt 5 месяцев назад

    Another great video!!

  • @mikailmoedeen1159
    @mikailmoedeen1159 2 года назад +1

    thanks chris. I'm trying to build my own game now. i done the war card game a year ago. I'm thirteen. it would really help me if after you finish this course, you could make a space invaders game. because the other videos i try to follow are too old, and you do so well with the changing Xcode's. thank you for every video

    • @CodeWithChris
      @CodeWithChris  2 года назад

      Hi Mikail. You can send tutorial recommendations here app.productstash.io/codewithchris#/ideas :) - Pat

    • @mikailmoedeen1159
      @mikailmoedeen1159 2 года назад

      @@CodeWithChris thanks for the reply but my mac says it can't find the server. also could you remake the star wars soundboard because i am huge star nerd as my family calls me

  • @CN30147
    @CN30147 8 месяцев назад

    Great tutorial. Thanks!

  • @milsabor
    @milsabor 2 года назад +2

    Hi Chris (from France). First thank you so much for all the time you spend for us. I love your videos. So clear and instructive. Question about parameter label (min 17:45…). Why not simply write « firstNum:Int » instead of « firstNum a:Int » and replacing a everywhere with firstNum? I don’t understand the purpose of naming the parameters. Thanks for advice.

    • @CodeWithChris
      @CodeWithChris  2 года назад +3

      Bonjour Pimu61!
      Naming the parameters is really a case by case decision. it's really up to you and also based on if you are going to code alone or in a team.
      Apple just made it possible to show (or not show) the parameters in 3 different ways. In some case the function is obvious that you don't need to bother with parameter (ex: sumOfTwoNumbers). Other will be very important because you want to handle data very carefully for one or the other (ex: SignUpNewUserToSecretDatabase(username, password) - as great chances Password will have to be protected on the network etc)
      In other cases, you are going to use an API or some sort of code created by a 3rd party like on Github etc. The function will be written by them and adding your own parameter label in between could be a way to customize it to your liking without breaking 50 lines of code inside the function (because renaming one parameter can break the code in A LOT of places)
      Hope this helps! :)
      Joyeux Noel!
      @AdrienVillez

  • @johnsonchukwu9923
    @johnsonchukwu9923 2 года назад

    Hi CHRIS, I JUST CAME ACROSS YOUR RUclips CHANNEL today and find it very helpful about what you do it's awesome your are really amazing how relaxed you are about all your tutorials.
    seeing how you explain everything please i want to use this opportunity to ask you the possibilty of me learning dapp development through you.
    i am also ready to be a subscriber but i have no single knowlegde about coding what are the possibilities for me
    hoping to hearing from you thank you
    Rich

    • @CodeWithChris
      @CodeWithChris  2 года назад +1

      Hi! You can start your iOS journey with us here codewithchris.com/start - Pat

    • @johnsonchukwu9923
      @johnsonchukwu9923 2 года назад

      @@CodeWithChris chris imagine me as someone that has no clue about the terms used, i absolutely know nothing about coding how you think i can make it
      i mean break things down as much as you but still not that easy for to comprehend
      do you think i can still make it?

    • @johnsonchukwu9923
      @johnsonchukwu9923 2 года назад

      @@CodeWithChris i never even expected to get a response from you that easily which shows your dedication to what your're doing i love it

    • @johnsonchukwu9923
      @johnsonchukwu9923 2 года назад

      @@CodeWithChris i don't have any ios device is then still possible to getting started? i have my life wish to at least be able to creating dapps or apps
      that's my biggest goal in life
      hope you can make my dream come through
      thank you Chris

  • @kenmccormack7801
    @kenmccormack7801 2 года назад +1

    This has been an awesome series. The last two lessons were easy for me since I had done structured coding way back, but learning it the new way. OO is a concept I'm only just getting to understand. But Pascal and C helped me understand this quick. I like the new stacked approach vs the storyboards.
    But one thing I have learned is that a lot of coding is reusing or editing old code. So is there a section on moving storyboards over to the new system?

    • @CodeWithChris
      @CodeWithChris  2 года назад +1

      We don’t have that, sorry. This is very hard to do. Most of the experienced developers will do the switch from storyboard to swiftui from scratch because it’s much easier to do.

  • @oscarmartinez-pc1nj
    @oscarmartinez-pc1nj 2 года назад +2

    You are sensational Chris I need more lessons 😅🙌

    • @CodeWithChris
      @CodeWithChris  2 года назад +2

      Ahaha thank you!!! We are cooking our Xmas dinner and editing Lesson 7 as we speak!
      Have a wonderful Xmas and see you soon!
      @AdrienVillez

    • @PhG1961
      @PhG1961 2 года назад

      I couldn't agree more !

  • @양양-r4v
    @양양-r4v Год назад

    You taught me the fun of the front end. Unfortunately, I am Korean, so I look at English subtitles,
    But it's still fun. (I don't know English. I understand it according to my interpretation.)

    • @CodeWithChris
      @CodeWithChris  Год назад

      Thank you for learning with us! :) - Pat

  • @instinct_beasts
    @instinct_beasts 2 года назад +1

    Super video Bro! :)

    • @CodeWithChris
      @CodeWithChris  2 года назад

      Thank you so much for the support!! - Pat

  • @thomasraufaste8833
    @thomasraufaste8833 2 года назад +1

    Hello! Really love to learn Xcode with you video.
    When do you think you will publish next lecon? :)

  • @Hasan-po6ud
    @Hasan-po6ud 11 месяцев назад

    Thanks

    • @CodeWithChris
      @CodeWithChris  11 месяцев назад

      Glad you liked it! Thanks for watching! - Iñaki

  • @radfaredu644
    @radfaredu644 2 года назад

    Thank U Teacher!

  • @glenn_r_frank_author
    @glenn_r_frank_author 11 месяцев назад

    The different "signatures" but same function name seems like a dangerous thing to do in programming... using basically the same now for two different things seems like asking for trouble. What reason would this be useful for? What am I missing?

  • @chrisb3523
    @chrisb3523 Год назад

    Hi Chris, really enjoying your videos :) just wondering why you would use var for the sum instead of let as we would not be changing it. I understand it's just a very simple example but is there a reason for this? thank you

    • @CodeWithChris
      @CodeWithChris  Год назад

      Great observation! I don't think there is a reason for it since it's just a simple example, but definitely use `let` when declaring a variable that doesn't change. - Iñaki

  • @mousepotatop9767
    @mousepotatop9767 Год назад

    I don't get the signatures part. Are they different, but you can use the same function label?

  • @LetsBuildThatApp
    @LetsBuildThatApp 2 года назад

    Quick note: () are referred to as parenthesis. I've never heard of them called "rounded brackets" in US or any dev from other countries.

    • @CodeWithChris
      @CodeWithChris  2 года назад

      Hey Brian! Thanks! I’ll use that from now. Happy to see you around!!

  • @ameliasaomarcos
    @ameliasaomarcos Год назад

    Nice

  • @gottafindacoolname
    @gottafindacoolname Год назад +1

    I didn't understand why it was "m"? why m?

  • @T1LTOLOGIST
    @T1LTOLOGIST 2 года назад

    when will this complete corse be finished and uploaded to CWC+ ??? I am a subscriber and am waiting for this to be uploaded so I can finish my learning?

    • @CodeWithChris
      @CodeWithChris  2 года назад +1

      Hi Ruben! We're looking to finish everything by january or early february - Pat

    • @T1LTOLOGIST
      @T1LTOLOGIST 2 года назад

      @@CodeWithChris thank you for the info

  • @SkechDotEth
    @SkechDotEth 2 года назад

    Is there anywhere that we can see the rest of the lessons before they’re uploaded to RUclips? I’d love to make an XCode app over the holidays

    • @CodeWithChris
      @CodeWithChris  2 года назад

      Unfortunately, no. These lessons are only uploaded on RUclips. - Pat

  • @ayush.gupta.
    @ayush.gupta. 2 года назад

    Hey Chris, great work. Is there any tool available to fetch the architecture or data flow from iOS application source code ? any tip would be great. Thanks

  • @john52192
    @john52192 2 года назад

    Hi Chris! Just curious what kind of mechanical keyboard you use? :)

  • @anarabbas2728
    @anarabbas2728 2 года назад

    Super

  • @MotorsportCreative
    @MotorsportCreative 2 года назад

    What’s the release cycle for the videos? I wanted to go along with the weekly releases, but it’s been a minute since the last video dropped.

    • @CodeWithChris
      @CodeWithChris  2 года назад

      New lessons are uploaded every week but we took a 2-week break over the holidays. But we're back with our schedule this week :) - Pat

  • @salawstudio9464
    @salawstudio9464 Год назад

    My dad say if I finish Xcode Ill join you☺😙

  • @BeakerHoneydew
    @BeakerHoneydew 2 года назад +1

    Why do you your video's keep showing a special youtube offer in the description when the offer has expired?

    • @CodeWithChris
      @CodeWithChris  2 года назад +1

      Hello Sarah. The link has expired because you checked the page before and the countdown went to zero. Now, I'll share a secret with you, keep this to yourself *wink wink*, email us at care@codewithchris.com and our webmaster there will help you with a reseted link! :)
      Thanks for learning with us!
      @AdrienVillez

    • @BeakerHoneydew
      @BeakerHoneydew 2 года назад

      Thank you, I have done this.

  • @ProVokeGames
    @ProVokeGames 2 года назад

    I have some swift exp. Am starting over fresh again. Is it worth learning SwiftUI right now or continue to relearn UIKit again if I'm looking for a job in 3-6 months. What do you think?

    • @CodeWithChris
      @CodeWithChris  2 года назад

      Most apps that are now in the App Store are mostly written in UIKit, so companies with existing apps may need developers with UIKit skills. This is not to say that nobody uses SwiftUI, but learning UIKit is also a practical thing to do if you want to maximize your chances of finding a job within 3-6 months.
      SwiftUI has been around for 2 years, and Apple makes it clear that it is the future.
      In my opinion, SwiftUI adoption now is like how the vast majority adopted Swift. When Swift arrived, everyone was hesitant because most of the apps were written in Obj-C, and it took a good 2-3 years before the majority adapted it.
      Learn UIKit to maximize your chances to get a job, then learn SwiftUI to future-proof your position.
      Good luck and happy learning! - Pat

  • @MotorsportCreative
    @MotorsportCreative 2 года назад

    Chris, if I were to print a function like print(sayHello(m: "Hi") the result on the console is ( ). Why is that?

    • @CodeWithChris
      @CodeWithChris  2 года назад

      Hi! We suggest posting on our CodeCrew forum so that our tech support staff can help you. Just visit this link codecrew.codewithchris.com - Pat

  • @georgeschannel6
    @georgeschannel6 2 года назад

    I have problems on Xcode - I have really good succeeds on playground but I keep getting Xcode project trouble and I can't launch the simulator and give me another comment telling me how to stop these breaking and the errors don't help. Thank you.

    • @CodeWithChris
      @CodeWithChris  2 года назад

      Hi! We suggest posting on our CodeCrew forum so that our tech support staff can help you. Just visit this link codecrew.codewithchris.com - Pat

  • @SCHAAAD
    @SCHAAAD 2 года назад

    when can we expect lesson 7?

    • @CodeWithChris
      @CodeWithChris  2 года назад

      Lesson 7 will be uploaded on Thursday :) - Pat

  • @Jp_248
    @Jp_248 Год назад

    🥰❤

  • @gottafindacoolname
    @gottafindacoolname Год назад

    on a magic keyboard its: shift+opt+( to make {

  • @misakatang8991
    @misakatang8991 2 года назад

    where's the next lesson!!😍🥰

    • @CodeWithChris
      @CodeWithChris  2 года назад

      The new lesson will be uploaded next week :) - Pat

  • @vardhanbhatt6671
    @vardhanbhatt6671 2 года назад +1

    Waiting for Lesson 7 :(

    • @CodeWithChris
      @CodeWithChris  2 года назад

      Lesson 7 will be uploaded next week! - Pat

    • @breakinggood-r2v
      @breakinggood-r2v 2 года назад

      @@CodeWithChris Where?is it done or it takes time I am waiting

  • @OOAK-Ireland
    @OOAK-Ireland Год назад

    'stand alone scope' , 'stand alone area'. sorry but im lost as you do not declare what it means...

  • @CheeseBae
    @CheeseBae 2 года назад +2

    As a C#/C++/Javascript developer, I find Swift's way of declaring variable types and parameter labels to be really weird and kinda ridiculous.

    • @d1a9n8a8
      @d1a9n8a8 2 года назад

      same

    • @CodeWithChris
      @CodeWithChris  2 года назад +1

      You know Apple like to make you Think Different! 🤣
      @AdrienVillez