Stopwatch App

Hi and hello. Monday was Presidents day which means that the school was closed and we had the day off. To celebrate Presidents Day (or because I needed the practice) I spent a little time doing a Swift tutorial. I had originally wanted to make an alarm, however, I wasn’t able to find any examples of that, so I ended up doing something a little simpler and making a stopwatch.

I followed a tutorial by Matt Heaney, and it was really good. I am definitely going to check out more videos from him. The tutorial that I did can be found on youtube here.

stopwatchSince I didn’t feel like recording the app (it really isn’t that interesting) here is just a little photo to show you what I made.

By default it is set to “0”, if you press start it will count seconds up until you press stop. Then you have to press “Reset” to bring it back to “0”.

To create the app I laid out what you see on screen on the storyboard. It is just a label, with three buttons. After that I hooked up those four items to the view controller. All in all, it was an extremely simple tutorial and if you are interested in playing around with Swift this is a good place to start.

Next, since I wasn’t able to find a Swift tutorial, I am going to attempt to translate an old objective-c tutorial for modern Xcode and Swift. Wish me luck! If I can get that to work, I will be well on my way to a functioning app.