Learning SwiftUI

Being a designer who can code can unlock many opportunities.

This blog won't be "fun" for an outsider to read, but I'd like keep a record of my progress over time. Eventually these will be case studies of projects that will be more interesting.

Why Learn SwiftUI

  1. Product Design Principles: iOS is well-established design environment that promotes solid design principles. I'd like to keep close to practicing good product design and not get stale.

  2. Ubiquitous + Innovative: Apple products are everywhere and will likely be around for many years while also pushing exciting innovations.

  3. iOS Developer Language of the Future: SwiftUI is Apple's coding language that they've been pushing for a few years now and promote as the future of iOS app development.

  4. Self-Publish an App: I've got to credit my wife for having a few apps that she would like to make. She is making a career jump into being in the tech space starting as designer, so this experience will have her sit in the driver seat of design while I learn the development side.

  5. Career Growth: I want to do cooler things! Growing professionally as a designer who can code will help me to stand out and be more competitive when the time is right.

How to Learn

  1. Paul Hudson's 100 Days of SwiftUI course is a well-known and highly recommended way to learn the fundamentals of iOS development.

  2. Working on personal projects and building them up over time. Keeps things interesting and learning a bit more focused.

  3. Connecting with others! I sat down with a connection who I am very excited to get guidance from.

Days 1-4

Day 1: Getting Started with Variables

In this first day, I downloaded XCode, the platform to write code. In the first tutorial, Paul introduced the basic ways of creating new variables with var (variables that are constants and immutable) and let (mutable variables that can be assigned right away, later on, not at all, or reassigned later). I learned how to create strings (text), whole numbers (integers), and decimals (floating point numbers and doubles).

Reflection: These concepts seemed basic, but I won't say it wasn't a challenge to start a whole new language!

Day 2: Booleans and Joining Strings

Booleans are true or false values and are common features in things like toggles or switches. With joining strings (text) you can assign variables (let or var) and then write a statement including those variables. Using \ instead of + is more flexible as it allows adding different items (integers, strings, etc.).

Reflection: I went through this several days ago and it was a bit over my head. Rewriting this blog from my notes, and it makes a lot more sense! This process will be a two steps forward, one step back until things click!

Day 3: Complex Data Types

Learned new terms like array (a way to hold multiple data types in one place). You can add values by using an append. Using angle brackets < > is a way to start with an empty array and then add items to it one by one. Array<Int> function is so common you can use [ ] with the data type inside of it [string].

I was also introduced to dictionaries which is another way to store a list, but this is a way to organize or position them in an order we would like.

Sets is another way to store, but a powerful way to recover data very quickly.

Enum is a set of named values that we create and then use in our code. It makes coding more efficient and safer, like creating days of the week, things that we'd use over and over again. Swift helps by using these to predict their usage.

Reflection: This was a big day. Lots to take in here, but I feel these are fundamental concepts that I'll need to know because they will come up a lot!

Day 4: Complex Data Types

Type annotations is a way to be explicit about what data types we are using. Swift naturally infers the type of data we are wanting to use, but sometimes it gets it wrong in cases. So, we use type annotations to explicitly tell Swift what we are wanting. The blue text in the screenshot below is the type annotation and shows that surname is indeed a string and score is indeed an integer.

Reflection: I took several days off between these lessons and at first I was very lost, thinking I really took a step back, but in reflecting and writing, it makes more sense.

Let's work together

If you have an idea or project you want to discuss, feel free to contact me.

CAL BRACKIN DESIGN

© 2023 Cal Brackin Design

Let's work together

If you have an idea or project you want to discuss, feel free to contact me.

CAL BRACKIN DESIGN

© 2023 Cal Brackin Design

Let's work together

If you have an idea or project you want to discuss, feel free to contact me.

CAL BRACKIN DESIGN

© 2023 Cal Brackin Design