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
VARis used to declare a variable that can be changed, whileletis 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.