/hack-a-thing-1-swiftlyworking

hack-a-thing-1-swiftlyworking created by GitHub Classroom

Primary LanguageSwift

hack-a-thing-1-swiftlyworking

What I Built - Add 1 Game

For my first hack-a-thing, I wanted to try my hand at an interactive Swift app. I've always tried to build ios apps in react-native since it's similar to React, but I've had lot of problems with needing to eject to add basic features. @RobertHe mentioned that if I'm primarily targeting ios users anyway, it's probably time to learn swift.

I found a great one page game tutorial from https://learnappmaking.com/creating-a-simple-ios-game-with-swift-in-xcode/ . It had its own assets to let me play with the UI and some basic algorithms to help me learn the language. The game itself is pretty fun. You type in one digit higher for each digit in a random 4-digit number as fast as you can in 60 seconds.

What I Learned

A couple of well designed assets really make or break the UI of this app. This is going to make me think hard about how I budget my time in the cs98 project.

This was also my first time using Swift and my first time really using xCode, so pretty steep learning curve on that. But overall, I really like how clean and logical everything is laid out, so it's quite likely I will use it for my CS98 project.

What Didn't Work

Can't get launch screen to run. Did fix negative score issue.

I had a lot of trouble setting the background image, because the constraints default to standard instead of Canvas and also the order listed in the Interface Builder Navigation really matter. However, there is a good amount of assistance available on the web.

The main thing I struggled with was getting xCode in the first place. I used to have it, but I foolishly deleted it and it required more disk space on my computer to install than I had. I actually wasted a lot of my hacking time looking through system caches to find out what I can delete and spent a lot of time learning about disk cleaner programs.