Swift Programming Tutorial | FULL COURSE | Absolute Beginner

Swift Programming Tutorial | FULL COURSE | Absolute Beginner

Introduction

The instructor introduces the course and explains his approach to teaching iOS development.

Course Overview

  • The course is called "iOS Dev Launchpad" and is designed for absolute beginners.
  • The instructor's goal is to provide a comprehensive introduction to iOS development through the lens of an experienced developer.
  • The course covers the basics of Swift, Xcode, and building beginner apps, as well as topics like career paths, third-party libraries, version control, networking, blogs, podcasts, and recommended books.
  • The instructor aims to strike a balance between providing enough information without overwhelming students.

Target Audience

  • The course is designed for absolute beginners but can also benefit those who are early in their journey.
  • There are almost 60 videos in the course that cover everything from downloading Xcode to learning about variables and Swift language.

Expectations

  • Students should not expect to become professional iOS developers after completing this course alone.
  • It takes at least six months of hardcore learning or even longer before one can get hired as a professional iOS Developer.

Support

  • A Slack channel has been created where students can get real-time help from both instructors and other students.

Introduction

The instructor introduces the course and what it covers. He also talks about his background and how he got into iOS development.

  • The course will cover both storyboard/interface builder and programmatic UI.
  • Swift UI is briefly discussed, but the course focuses on UIKit since it's still dominant in the industry.
  • The course covers general programming knowledge such as APIs, third-party libraries, version control, and different career paths.
  • The instructor recommends resources for future learning.
  • The instructor shares his story of how he got into iOS development without prior experience.

Instructor's Background

The instructor shares more details about his background and how he got interested in coding.

  • The instructor became interested in coding while working for a startup as a growth lead/salesperson.
  • He started asking questions about coding to the engineers on his team and realized that he was just as smart as them.
  • He started exploring coding by watching online videos, taking courses, and Googling.
  • In 2015, he did an iOS Developer boot camp which helped him get hired at his first real iOS Developer job at Breathometer.

Getting Hired at Breathometer

The instructor shares how he got hired at Breathometer despite failing the phone screen interview.

  • After failing the phone screen interview, the instructor emailed Breathometer asking if they had a take-home project that he could work on to showcase his skills.
  • They agreed to give him a take-home project which helped him get hired even though he didn't have a CS degree or much experience.

Getting Started in Tech

In this section, the speaker talks about how they got started in tech and their first job.

First Job

  • The speaker took a job that paid well below market rate because they had applied to 60 companies and weren't getting any offers.
  • They planned to ask for a raise after six months of proving themselves.
  • Within a month and a half, their boss recognized their hard work and gave them a raise to market rate.
  • The speaker worked at this company for about a year and a half before leaving to interview at major companies like Facebook, Apple, and Google.

Learning Through Failure

In this section, the speaker talks about their experience interviewing at major tech companies and how it led them to start their YouTube channel.

Failed Interviews

  • The speaker failed all of their interviews with major tech companies but saw it as an opportunity to learn.
  • They used this experience as motivation to start their YouTube channel where they could showcase their knowledge rather than wait for an interview.

Independent Contracting

  • While struggling with interviews, the speaker picked up contracts on the side which eventually led them to try independent contracting full-time.
  • This period was when the speaker learned the most because they bounced around from project to project every few months.

Building Products From Scratch

In this section, the speaker talks about working at Aluna where they built an app from scratch with video game elements.

Working at Aluna

  • The speaker joined Aluna in April 2018 where they had the opportunity to build an app from scratch with video game elements.
  • They worked there full-time until July 2019 before transitioning into a part-time consultancy role.

Choosing a Path

In this section, the speaker talks about being at a crossroads in their career and deciding between pursuing a big company job or focusing on their YouTube channel.

Big Company vs. YouTube Channel

  • The speaker was in serious talks with PayPal and Twitch for big company jobs but ultimately decided to pursue their YouTube channel full-time.
  • They wanted the clout and prestige of having a big company on their resume but realized they were more interested in building their own business.

Introduction to Xcode and iOS Development

In this section, the speaker introduces himself and shares his story of how he became an iOS developer. He then explains what Xcode is, its importance in iOS development, and how to download it.

Becoming an iOS Developer

  • The speaker shares his story of becoming an iOS developer.
  • Working for himself allows him to work on fun projects that help his YouTube business.
  • His income from working for himself has surpassed his Silicon Valley developer salary.

Introduction to Xcode

  • Xcode is Apple's first-party IDE for writing code for Apple's platforms (iOS, macOS, watchOS).
  • It is constantly updated and has a new release cycle every June.
  • Opening up a project in Xcode creates a full-fledged app while opening up a playground is like a scratch pad for your code.

Downloading Xcode

  • You need a Mac to download and use Xcode as it runs on macOS.
  • Go to the App Store, search for "Xcode," and click on the download button.
  • After downloading (which takes about 30 minutes), you can find it in your Applications folder.

Introduction to Xcode and Customizing the Theme

In this section, the instructor introduces Xcode and shows how to customize its theme.

Customizing Xcode Theme

  • The instructor shows how to customize the Xcode theme by going to Preferences > Fonts & Colors.
  • There are several themes available, including Civic and Midnight. Choose whichever you prefer.
  • You can also customize individual aspects of the theme, such as font and color for comments.

Understanding UI Kit vs Swift UI

In this section, the instructor explains the difference between UI Kit and Swift UI.

What is UI Kit?

  • UI Kit is what has been used to build user interfaces in iOS development since it came out.

What is Swift UI?

  • Swift UI is a new direction that Apple is taking for all of its future development.
  • It was first introduced in 2019 but is still early in its development.

Which One Should You Learn?

  • While there will be some jobs that require knowledge of Swift UI, it will not be relevant in the job market for a few years.

UI Kit vs Swift UI: Which One Should You Learn?

In this section, the speaker discusses whether to learn UI Kit or Swift UI and provides an overview of both.

Learning Both is Necessary

  • It's necessary to learn both UI Kit and Swift UI because most iOS apps are built in UI Kit.
  • Even though Swift UI is gaining popularity, it's still too early in its development for it to be relevant in the job market.
  • Millions of apps are already built in UI Kit, so it's hard to avoid learning it.

Course Focus

  • This course focuses on teaching UI Kit but also includes two videos about Swift UI towards the end.
  • The goal of the course is to provide a foundation of knowledge for both frameworks.

Updated Opinion on UI Kit vs Swift UI (October 2021)

In this section, the speaker provides an updated opinion on whether to learn UI Kit or Swift UI as of October 2021.

Job Market Relevance

  • As of October 2021, most iOS jobs still require knowledge of UI Kit.
  • However, there has been a gradual increase in job postings that require knowledge of Swift UI.

Learning Both is Still Recommended

  • The speaker still recommends learning both frameworks because it takes time to become proficient and job requirements may change over time.
  • If someone wants to focus solely on Swift UI, they should be aware that it may limit their job prospects currently but could be beneficial in the future.

Personal Experience

  • The speaker learned Swift when it was still new and not widely used in the job market, but it ultimately paid off for him.

Should You Learn SwiftUI or UIKit?

In this section, the speaker discusses whether to learn SwiftUI or UIKit.

Learning Both is Necessary

  • It may be harder to find a job if you only know one of the two.
  • Those who like taking risks can go all-in on SwiftUI, while those who are more conservative should focus on learning both.

Introduction to Swift

In this section, the speaker introduces Swift and its brief history.

What is Swift?

  • Swift is a relatively new programming language that was announced in 2014.
  • Apple engineers built Swift by taking their previous knowledge with Objective C and researching new and modern languages.
  • As an iOS developer, tying your career to Apple is a safe bet as long as you believe that Apple will be around for a long time.

Benefits of Using Swift

  • One of the major selling points of Swift is that it's a safe language with type safety objects.
  • Compile-time errors are preferred over runtime errors because they help catch errors before building an app.

Brief History of Swift

  • Swift has undergone massive changes since its announcement in 2014.
  • Old resources from 2015 or earlier may not be relevant due to these changes.
  • Going open source in 2015 allowed the iOS developer community to contribute to the language itself.
  • The release of Swift 3 in 2016 caused many breaking changes but subsequent updates have been smoother.

A Brief History of Swift

This section provides a brief history of the Swift programming language and its current state.

The Release Cycle of Swift

  • Every year at WWDC, Apple would release a new version of Swift.
  • However, with the roadmap to Swift 6, there will be no major yearly releases. Instead, it will be released when ready.
  • This shows that the language is maturing and becoming more stable.

Swift Beyond Apple

  • Chris Lattner brought Swift to Google and spearheaded its use in TensorFlow for machine learning.
  • Swift is also being used for server code and is actively being worked on for Windows.
  • Although it may not be on all platforms yet, the language's maturity suggests that it will continue to expand beyond Apple.

Resources for Learning Swift

This section recommends resources for learning Swift.

Recommended Resources

  • The official "Swift Programming Language" book from Apple is a valuable resource but can be technical for beginners.
  • The "Swift Playgrounds" app is free and geared towards beginners with gamified features.
  • Links to the official Swift website page and a fun video about the reveal of Swift at WWDC in 2014 are provided in the description.

Types in Swift

This section introduces types in Swift.

What Are Types?

  • A type refers to what type something is. For example, an integer (int) is a whole number that can be negative.
  • There are many types in Swift, but this video focuses on the foundational ones: int, float, and double.

Examples of Types

  • An example of an int type is a high score in a video game.
  • A float type is used for decimal numbers with fewer digits of precision than a double type.
  • A double type is used for decimal numbers with more digits of precision than a float type.

Types and Variables

This section covers the basics of types and variables in Swift.

Types

  • A type is a category of data that determines what values an object can have.
  • Swift has many built-in types, including Int, Double, String, and Bool.
  • We can also create our own custom types when we create classes.
  • Type inference is a big feature of Swift where the compiler can automatically infer the type based on the value assigned to it.

Variables and Constants

  • Variables and constants capture a value so you can use that value throughout your code base.
  • The difference between a variable and a constant is that a variable can be mutated or changed whereas a constant cannot be mutated or changed.
  • Making something a constant provides safety features to avoid accidental changes and performance optimization for faster code execution.

Setting up Playground

This section covers how to set up Xcode playground.

Opening Playground

  • To open Xcode playground, click on "Get started with playground" then select "Blank".
  • Name your file whatever you like then save it to your desired location.

Using Playground

  • Playgrounds are interactive coding environments where you can write code and see results immediately without having to build an entire app or project first.
  • You can add comments by using double forward slashes (//). Comments are ignored by the compiler but help explain what's happening in your code.

Variables and Constants

This section covers the difference between variables and constants in Swift.

Variables vs Constants

  • VAR is used to declare a variable that can be changed, while let is used to declare a constant that cannot be changed.
  • Attempting to change a constant will result in an error.
  • Developers may refer to both variables and constants as "variables" in conversation, but it's important to distinguish between the two when coding.

Examples

  • An example of a constant would be someone's name, which should not change. An example of a variable would be the number of active users on an app, which can fluctuate.
  • The value captured by a variable or constant can be used throughout the code base.

Arrays

This section covers arrays in Swift.

Basics of Arrays

  • Arrays are containers or lists of objects that are numbered starting at 0.
  • The order of items in an array is determined by the order they were added.
  • Arrays can contain different types of data, such as strings or integers.

Example Code

  • A sample playground demonstrates how arrays work in Swift.

[CUTOFF_LIMIT]

Turn any video into a summary like this

YouTube links, meetings, lectures. With transcripts, search, and chat.

Video description

My Swift & SwiftUI Courses - https://seanallen.teachable.com/ Swift News Newsletter - https://swiftnews.kit.com/newsletter Swift & iOS Development for Absolute Beginners - FULL COURSE When you've finished this course, try my SwiftUI Fundamentals course which is now free: https://www.youtube.com/watch?v=b1oC7sLIgpI Curriculum Timestamps: 00:00:00 - Course overview 00:05:36 - I was just like you 00:13:48 - What is Xcode? 00:19:47 - SwiftUI or UIKit (2020) 00:22:27 - SwiftUI or UIKit (2021) 00:26:00 - Intro to Swift Language 00:33:30 - Swift Types 00:37:15 - Variables 00:42:10 - Array 00:49:37 - Set 00:57:59 - Dictionary 01:02:25 - Functions 01:14:50 - if / else 01:21:15 - For Loops 01:30:29 - Enum 01:40:27 - Switch Statement 01:48:49 - Operators 02:01:45 - Optionals 02:12:46 - Self 02:15:27 - Class 02:23:36 - Inheritance 02:31:31 - Struct 02:36:45 - Extension 02:40:30 - Apple Developer Program 02:43:54 - Tour of Xcode 02:58:56 - What’s New in Xcode 12 03:08:07 - What’s New in Xcode 13 03:24:59 - What’s New in Xcode 14 03:34:54 - What is Auto Layout? 03:38:38 - What is UIKit? 03:55:05 - Storyboard vs. Programmatic UI 04:01:16 - FizzBuzz Challenge 04:09:27 - Colors App Intro 04:10:39 - Colors App - Navigation 04:25:02 - Colors App - UITableView 04:36:37 - Colors App - Code 05:05:56 - Card Workout App - Intro 05:08:53 - Card Workout App - Storyboard UI 05:21:20 - Card Workout App - IBOutlets 05:41:49 - Card Workout App - Storyboard Logic 05:59:27 - iOS 15 Storyboard Buttons 06:08:05 - Programmatic UI - Setup 06:17:37 - Programmatic UIButtons 06:25:55 - Card Workout App - Card Selection 06:44:29 - Card Workout App - Rules Screen 07:04:07 - Card Workout App - Logic 07:13:52 - iOS 15 Update - UIButtons 07:24:24 - SwiftUI Overview 07:34:06 - SwiftUI Example 08:00:29 - General Knowledge Section Intro 08:01:57 - How Apps Work 08:05:34 - What is an API? 08:10:00 - What is Version Control? 08:19:34 - 3rd Party Libraries 08:25:56 - What are Edge Cases? 08:30:55 - iOS Dev Career Paths 08:36:48 - World of iOS Dev 08:38:31 - Why WWDC is the best 08:45:02 - Twitter will change your career 08:55:30 - Swift blogs & websites 09:03:47 - Book Recommendations 09:10:40 - Podcast Recommendations 09:20:23 - Next Steps 09:26:18 - Thank You! 09:29:04 - Bonus: Homeless to $130k iOS Dev 09:46:21 - Bonus: 37 Tips for Jr. Developers 10:01:04 - Bonus: I’m an Average Developer 10:06:34 - Bonus: 9 Things I Wish I Knew When I Started 10:16:46 - Bonus: How to Gain Confidence as a Dev 10:25:56 - Bonus: The 90/90 Rule My other iOS Developer Courses https://seanallen.teachable.com/ Card Deck Assets: https://www.dropbox.com/sh/ygwlohcppk0c8dv/AACDU3NSO8oK8i74SNXDY68Ta?dl=0 SwiftUI Video Thumbnail Assets: https://www.dropbox.com/sh/cpp1ibizedt6f9t/AABJHoTqiQf_-A1n1aMUpKpla?dl=0 https://seanallen.co Twitter: https://twitter.com/seanallen_dev Hired.com: https://hired.com/x/1n01g Book and learning recommendations that help out the channel if you decide to purchase (Affiliate Links): Paul Hudson's Hacking With Swift: https://gumroad.com/a/762098803 Donny Wals - Combine: https://gumroad.com/a/909014131 Mark Moeyken’s SwiftUI Books: www.bigmountainstudio.com/swiftui-views-book/fzc51 Objc.io Books (Thinking in SwiftUI & Advanced Swift): https://gumroad.com/a/656585843 Ray Wenderlich Books: https://store.raywenderlich.com/a/20866/link/1 #swift #softwaredeveloper #iosdeveloper