Swift Programming Tutorial for Beginners (Full Tutorial)

Share
Embed
  • Published on Nov 6, 2018
  • Learn how to code with Swift in one single tutorial!
    We'll go through all the core concepts of Swift including:
    Variables and Constants, Data Types, Properties, Functions and Parameters, Classes, IF Statements
    And a lot more!
    Get a customized roadmap for your app and start building it in 7 days:
    ⚡ codewithchris.com/actionplan/?
    ALL my recording equipment and recommended books:
    📚www.amazon.com/shop/codewithchris
    To continue learning how to make apps with us, be sure to subscribe to our channel:
    ruclip.com/user/codewithchris
    And we also have a thriving Facebook community where you can meet like minded iOS learners and get support on your own iOS app development journey!
    groups/codewithchriscommunity/
    You can download the Cheatsheet from here:
    codewithchris.com/swift-cheat-sheet/
    My guide for Xcode on Windows:
    codewithchris.com/xcode-for-windows

Comments • 406

  • CodeWithChris
    CodeWithChris  11 months ago +25

    QOTD ⚡ Is Swift your first programming language? Let me know! 👇 Kick start your own app with my free 7 Day App Action Plan ➡️ bit.ly/7dplan

    • 崔诗敏
      崔诗敏 13 days ago

      Technically yes, learned about html before but never coded my own web page.

    • juice drake
      juice drake 20 days ago

      ok

    • juice drake
      juice drake 20 days ago

      i am but phone is stolen so got to order a new one

    • Josh Rabbani
      Josh Rabbani Month ago

      yeah

    • FreedomJunkie
      FreedomJunkie Month ago

      Swift will be my first app programming language. I've built apps using Gamesalad, and in the olden days built websites with HTML, but this looks like it'll be fun! I'm really enjoying this so far (I'm halfway through), thanks to your excellent teaching style & voice. Thank you.

  • Challenger Software

    how can create databases from c#

  • Toya Smith
    Toya Smith 2 days ago

    Thanks i have learned a lot

  • Joshua Grubbs
    Joshua Grubbs 4 days ago +1

    how do i get my compiler to autoplay like yours?

    • CodeWithChris
      CodeWithChris  3 days ago

      Hello! Could you share your question in our community group here (bit.ly/CodeCrewCommunity)? Also please check the posting guidelines (bit.ly/CWCHowToAskForHelp) so we can help you the best as we can!
      Thanks for being a CodeCrew member!
      Kat

  • Siri Neztity
    Siri Neztity 5 days ago +1

    Good tutorial!
    let me ask a question to you.
    I am a beginner. and try to build a dictionary app.
    I have a database (json file size about 13MB)
    The question is where should I storage my database file?
    on a local or an online?
    Hope you respond to me.
    Thank you in advance!

    • CodeWithChris
      CodeWithChris  4 days ago

      Could you share your question in our community group here (bit.ly/CodeCrewCommunity)? Also please check the posting guidelines (bit.ly/CWCHowToAskForHelp) so we can help you the best as we can!
      Thanks!
      Kat

  • Esohe Dickson
    Esohe Dickson 9 days ago +1

    What is swift all about?

    • CodeWithChris
      CodeWithChris  7 days ago

      Give it a try! Your brain can catch anything!
      @AdrienVillez

    • Esohe Dickson
      Esohe Dickson 8 days ago +1

      @CodeWithChris thanks for reaching out to me. I don't think my brain can catch that.

    • CodeWithChris
      CodeWithChris  9 days ago

      Swift is Apple's programming language to make iOS, macOS, iPadOS, tvOS, and watchOS apps.
      This is what we use here to code
      @AdrienVillez

  • faiz masroor
    faiz masroor 9 days ago +1

    chris , i got 6 years working experience . i spent 4 years in iOS development using objective C and 2 years now as Android app developer. and now also started moving towards react native . Can you guide me if learning swift would be an advantage for me ? for should i continue more towards react native

    • CodeWithChris
      CodeWithChris  9 days ago

      I have no experience with React Native so, I won't be able to help you but I can say that if you care about the code you write for your iOS app to allow it to be as close to the hardware with the software, then Swift is a smart move.
      Also, Swift is like 95% like Python so, you kinda learn two languages in one!
      @AdrienVillez

  • 崔诗敏
    崔诗敏 13 days ago +1

    Hey Chris, I am a pm with my own thought of an app and I really want to get it running on my iPhone. Now I am not working these days so I thought I can learn to code and develop my own app, this is why I am here. I hope in a year I will be using an app developed by myself!

    • CodeWithChris
      CodeWithChris  12 days ago

      Great idea, use your free time for something creative! Who knows, maybe if you keep a daily routine of coding, you could be using that app in 6 months!
      @AdrienVillez

  • slash0t5
    slash0t5 16 days ago +1

    I hope you get a Lamborghini someday. You deserve it.

    • CodeWithChris
      CodeWithChris  13 days ago

      Thank you thank you! I'm still not sure about the color tho?
      @AdrienVillez

  • iglacious ichigo
    iglacious ichigo 16 days ago +2

    YOU THIS IS SOME COOLSHIT!!!!!!

    • CodeWithChris
      CodeWithChris  13 days ago

      Oh look, all in one word and youTube doesn't block that!
      Well, welcome to the group of the COOLDEVS! #NoShitSherlock!
      @AdrienVillez

  • Farhan Jailani
    Farhan Jailani 18 days ago +1

    Blue Ferrari

    • CodeWithChris
      CodeWithChris  18 days ago

      I'd love to have a Tesla but sure, we can race later!
      @AdrienVillez

  • Kony James
    Kony James 20 days ago +1

    wooooow!

    • CodeWithChris
      CodeWithChris  20 days ago

      Glad to see this was useful to you!
      @AdrienVillez

  • shereen masud
    shereen masud Month ago

    Fake

  • John Wane
    John Wane Month ago +1

    If you are having problems with stuff not showing up in the console, like for instance: 'hello, playground', try holding the play button, switch to automatic and back to manual. It should work, worked for me :)

    • CodeWithChris
      CodeWithChris  Month ago

      The Playground can be a bit picky!
      Sometimes it needs a nudge or a push!
      @AdrienVillez

  • Justin Sams
    Justin Sams Month ago +1

    I am new to Xcode and programming in general. I would like to program object orientated and I am looking for the way to make a new class and then link it to my ViewController. For example just for kicks I am making a black Jack app and what I would like to do is make "Player" a new class so I do not have to repeat my code the whole time. What is the best way to make this happen?

    • CodeWithChris
      CodeWithChris  Month ago +1

      Hello, we created a forum for people needing coding help. Could you share your question to our CodeCrew Community codecrew.codewithchris.com/ with screenshots if possible? Thanks!
      -Kat

  • Vijay Sharma
    Vijay Sharma Month ago +1

    Swift is a lot like Kotlin. Or maybe Kotlin is a lot like Swift. Maybe IOS development is a lot like android...wait what?

    • CodeWithChris
      CodeWithChris  Month ago +1

      Maybe they're alike and also different in many different ways.
      Kat

  • yung tube
    yung tube Month ago +1

    PC USERS! just get the AppCode IDE from JetBrains

    • CodeWithChris
      CodeWithChris  Month ago

      Mmmmmh, looks decent!
      Gonna need to check it out myself!
      @AdrienVillez

  • Sarbjit singh
    Sarbjit singh Month ago +2

    Hey Chris I want to implement pdf editor in my app... Please help Chris ..

    • CodeWithChris
      CodeWithChris  Month ago

      We don't have a tutorial for that. This might be a good guide www.raywenderlich.com/4023941-creating-a-pdf-in-swift-with-pdfkit
      Kat

  • Moon Unity
    Moon Unity Month ago +2

    This is a good job. Please continue your work ! Thank you very much !

  • Eujoh I is I
    Eujoh I is I Month ago +2

    Just started today and I am really appreciating @CodeWithChris

    • Eujoh I is I
      Eujoh I is I Month ago

      Hello ...I am having some problems at lesson seven....my I am clicking on my main.storyboard but getting no selection

    • CodeWithChris
      CodeWithChris  Month ago +1

      Thanks for learning with us!
      -Kat

  • Legotronforce
    Legotronforce Month ago +3

    Well, I fell asleep doing this .-.

    • Josh Wilton
      Josh Wilton Month ago

      oof

    • CodeWithChris
      CodeWithChris  Month ago +1

      Well, you didn't have to watch the whole thing bit.ly/LearnSwift2019
      -Kat

  • Josh Wilton
    Josh Wilton Month ago +1

    Thanks For The Tutorial!

    • Josh Wilton
      Josh Wilton Month ago

      @CodeWithChris the only change I would make would be a bit faster

    • CodeWithChris
      CodeWithChris  Month ago

      Welcome!! Thanks for watching :)
      -Kat

  • Er Land
    Er Land Month ago +1

    how about we can survive this?

  • Jamhur / Davronov
    Jamhur / Davronov Month ago +1

    why on mine said Xcode BETA...

  • dunia la ni
    dunia la ni 2 months ago

    I have zero knowledge about programming language...do you think this is a good start?or should i attend any programming class?

    • CodeWithChris
      CodeWithChris  Month ago

      Hello there! This tutorial is especially made for beginners like you with zero background knowledge. If this is overwhelming for you, you can try the playlist version bit.ly/LearnSwift2019
      Just take it slow, watch again if there's something you didn't understand. It also helps to code along. Enjoy! :)
      -Kat

  • Nihar Chavatapalli
    Nihar Chavatapalli 2 months ago +1

    Is this swift 5, if not can I use swift latest version with what you taught?

    • Nihar Chavatapalli
      Nihar Chavatapalli 2 months ago

      @CodeWithChris Thank you bro. Didn't except such a quick reply. By the way I'm just a 9th grader trying to learn Coding. I just wanna be someone great like bill gates or mark Zuckerberg. I really admire your work. It helped me a lot.

    • CodeWithChris
      CodeWithChris  2 months ago +1

      Swift 5 version of this video is right here :) ruclip.com/video/FcsY1YPBwzQ/video.html

  • Holly ZHANG
    Holly ZHANG 2 months ago

    is there a shortcut to run the program? why I couldn't find one?

  • Saqib Tariq
    Saqib Tariq 2 months ago +1

    Great tutorial !
    Subscribed :)
    Thank you.

  • nicole baumel
    nicole baumel 2 months ago +1

    sup bro

  • Learn Tech
    Learn Tech 2 months ago +1

    Hey Chris I wish to have some questions so that I could practise it all the time and make my code easier for me. Can anyone send me any link where I can find questions of swift so that I can practise it ??

    • CodeWithChris
      CodeWithChris  2 months ago +1

      Here are some challenges mega.nz/#!exlCwaoQ!Gio3G9gEug_Mx17R3dneRJch0p3XxyEsjTx7jObaPTo
      -Kat

  • Jing Catarman
    Jing Catarman 2 months ago +1

    Is just a merge of java code and c++

    • CodeWithChris
      CodeWithChris  2 months ago

      Yes, I heard there are some similarities to C++
      -Kat

  • ElkeGameMetChris
    ElkeGameMetChris 2 months ago +1

    Note to myself. 22:44

  • Jon Reed
    Jon Reed 2 months ago +1

    Yo

  • Robert Nyambuga
    Robert Nyambuga 2 months ago +1

    Authentic master-piece!

  • Dave Strayer
    Dave Strayer 2 months ago +1

    Very insightful. I'm glad I stopped by. You really boosted my learning curve. Thanks!

  • Dave Strayer
    Dave Strayer 2 months ago +1

    Awesome video Great content and very helpful. Something to model as I grow my own channel and business.

    • CodeWithChris
      CodeWithChris  2 months ago +1

      Thank you so much! Glad you found this tutorial super helpful!
      -Kat

  • Nazmul Siddiqui
    Nazmul Siddiqui 2 months ago +1

    this is awesome Chris. . .thanks much

    • CodeWithChris
      CodeWithChris  2 months ago

      Thanks for the feedback! Really appreciate it!
      -Kat

  • Sepideh Salasel
    Sepideh Salasel 2 months ago

    The video was great,thank you

  • frank adu
    frank adu 2 months ago +1

    Good job! my coach.

  • ⵣ Jeunesse Sportive de Kabylie ⵣ

    Is there a system version? Mac 10.10

    • ⵣ Jeunesse Sportive de Kabylie ⵣ
      ⵣ Jeunesse Sportive de Kabylie ⵣ 2 months ago

      @CodeWithChris
      Thank you very much

    • CodeWithChris
      CodeWithChris  2 months ago +1

      Hello, if you just want to learn basic swift it would be ideal to use the online version of the compiler at online.swiftplayground.run

      but if you want to move forward and do xcode/app programming then you need to invest in a new mac as 10.10 mac version is too old now. the latest version is 10.14.6 (mojave) already, the minimum would probably be using 10.13.6 (high seirra) but its best to just move on to ta computer that can already handle mojave
      - Francis

  • Matthew Scullino
    Matthew Scullino 2 months ago +1

    Amazing video. Super helpful, I watched the whole thing.

    • CodeWithChris
      CodeWithChris  2 months ago

      Thanks for the feedback and for watching the full tutorial! We REALLY appreciate it!
      -Kat

  • Don Freecss
    Don Freecss 2 months ago +2

    thank you very much
    greetings from peru

  • Najd Al-Oqaili
    Najd Al-Oqaili 2 months ago +1

    It is so funny at first i wanted to choose in between your course and freeCodeCamp one, but after 5 minutes i noticed they are the same haha. Thank you so much for the great work

    • CodeWithChris
      CodeWithChris  2 months ago

      Thank you so much for learning with us!
      -Kat

  • kd dan tubes
    kd dan tubes 2 months ago +2

    im learning this on my macbook air 2017

    typed

    for _ in 1...100000000 {

    print("iphone 11 pro design sucks on so many levels")
    }

    and guess what ----my xcode is hang since last 1 hr...

    i m enjoying the for loop in

    • CodeWithChris
      CodeWithChris  2 months ago

      Hello, its because you printed a string 100 million times thats why its trying to print and use your processor and graphics card for that, its not crashing becuase its not "infinite" but it will take a while before it stops.. might as well terminate xcode from the activity monitor
      - Francis

  • Matt Parsons
    Matt Parsons 2 months ago +2

    Thank you for taking the time to make this video for us! I really appreciate it!

    • CodeWithChris
      CodeWithChris  2 months ago

      And thank you so much for taking the time to watch the full tutorial!
      -Kat

  • Ali Hamah
    Ali Hamah 2 months ago +3

    The background is viewers friendly..

  • Szanna’s Fun Clubhouse
    Szanna’s Fun Clubhouse 3 months ago +2

    my daughter is only two years old and already on the same page as you awesome!!!!

  • Nill
    Nill 3 months ago +2

    Now do a video where you use/try C#.

  • Elias Williams
    Elias Williams 3 months ago +1

    Sucks I have an Android.

    • Wayne Brehaut
      Wayne Brehaut 24 days ago

      Learn Python instead--very similar, easy to learn the basics, fun to code, lots of app libraries and good textbooks. Lots of RUclip tutorials and other free lessons and references. See www.python.org/ or go straight to documentation and tutorials at docs.python.org/.

    • CodeWithChris
      CodeWithChris  3 months ago

      Android apps are written in a different programming language
      -Kat

  • Trifon RAYKOV
    Trifon RAYKOV 3 months ago +1

    hiii

  • Doyle Lucas
    Doyle Lucas 3 months ago +1

    5

  • Omar Bailey
    Omar Bailey 3 months ago +2

    1

  • Zack C
    Zack C 3 months ago +1

    no offense to Matt Heaney, CodeWithChris is the Man thanks brother I finally understand this shit

    • CodeWithChris
      CodeWithChris  3 months ago

      Thank you so much for learning with us!
      -Kat

  • Hossein Hashemi
    Hossein Hashemi 3 months ago +1

    Hi Chris,
    Very good for a newbies, do you have video walkthrough for making real application?

    • CodeWithChris
      CodeWithChris  3 months ago

      Try this ruclip.com/p/PLMRqhzcHGw1YdahNsCLZdSVfNv0stwvdx or this bit.ly/BeginnersPlaylist
      -Kat

  • will andrei
    will andrei 3 months ago +1

    good

  • Suman Khanal
    Suman Khanal 3 months ago +1

    Thank you. Great tutorial with easy to follow. If you have time can you do similar tutorial with Perl 6?

    • CodeWithChris
      CodeWithChris  3 months ago

      Thank you for your support! Unfortunately, we only focus on Swift and iOS app development.
      -Kat

  • TheMadPolarBear
    TheMadPolarBear 3 months ago +5

    Using your tutorial to learn Swift. I've got no background or knowledge on coding of any kind but I've always wanted to put my ideas into an iPhone app. Hopefully i'll have one of my apps up and running within a year or so!

    • CodeWithChris
      CodeWithChris  3 months ago

      With dedication, you'll be able to do that in less than a year! Good luck!
      -Kat

  • Min Cheng Chen
    Min Cheng Chen 3 months ago +2

    This is rather fun. VBA is actually my first programming language that I use at work for Excel template development. Learning Swift on the side for fun. Switching from Windows 10 to Mac OS requires a transitional period. I mean the Command key functions a lot like the Ctrl key on Windows, but they are at the opposite side. And I kept on pressing the Command key as if it was the Alt key.

    • CodeWithChris
      CodeWithChris  3 months ago

      You'll get used to it as time goes by. 😄
      -Kat

  • Ychhc Chchhv
    Ychhc Chchhv 3 months ago +3

    I am a 10 year's old boy and I have been learning how to code since I was 8 and I am still learning

    • Cosmic Dark Matter
      Cosmic Dark Matter 3 months ago

      @The Perfect Slime...Keep learning. Don't quit. You'll be glad you did someday...

    • CodeWithChris
      CodeWithChris  3 months ago

      Cool! You're doing great!
      -Kat

  • Grease quala
    Grease quala 4 months ago +1

    Swift is like doing C and Javascript hybrid code, kind of confusing time to time

    • CodeWithChris
      CodeWithChris  3 months ago

      Just practice, practice, practice and soon it will be like native to you ;)
      - Francis