Why I started learning SwiftUI

February 24, 2021
SwiftUI is a framework developed by Apple for Swift. It makes creating iOS applications more intuitive to develop and is fun. If you are wondering if you Should learn SwiftUI I would totally recommend it.

A bit about me and Frameworks

I started getting into application programming a few years ago. Growing up I dabbled with C, Python, a bit of JavaScript. When apple introduced the world to Swift in 2014, I was excited. I’ve been an Apple user for years and really liked the idea of developing applications in Swift made sense.  

Fast forward to 2018, I started my official journey into software engineering. I was introduced to a whole new world of computer languages, Ruby, C#, PHP etc. Oh, and there are so many patterns and concepts when programming it becomes very over whelming very quick. Thank god they also taught us about Frameworks. Frameworks are tools and methodologies developed for programmers to use that will streamline and simplify development. A framework will allow you to focus on the overall development while managing all the low-level functionality.

Should I learn SwiftUI? Yes

SwiftUI was introduced in 2019 as a framework for Swift programmers. I remember seeing the Apple Developer conference and getting excited about all the cool things that can be done.  

First off all, you can get a lot done with a small amount of code. This was very appealing for me at the time because the programs I was writing required a lot of code. If you have ever programmed in C you know what I’m talking about. SwiftUI is extremely easy to read so you can quickly look at a view and get a good sense of what is going on.

Second, there are a lot of developer tools right out of the box with SwiftUI. For example, SwiftUI has a massive collection of icons called SF symbols. If you need an icon for a home button, message bubble, or pencil icon, it is already there in SwiftUI. There is a lot of drag-and-drop abilities in SwiftUI so you can drop a button and the code is generated for you. These concepts are great for making something quick and dirty to get up and working. I like that.

Third, Stacks. You can quickly layout your view using a stack system that is pretty easy to wrap your head around. You can organize views (elements) in a VStack or vertical stack. You can organize your views in an HStack so horizontally. And finally, in a ZStack which is laying elements on top of each other. After a few minutes you can put something together that looks great with the SwiftUI Stack system.

These are just a few of the features of SwiftUI that I really liked from the start. As I learn more about this framework I will post more. There are a ton of awesome documentation including the apple developer's site. I recommend doing the SwiftUI tutorial to get your feet wet.

I think as I learn more about SwiftUI I will start to develop some SwiftUI tutorials. I think it will be helpful for everyone including myself.