Austin Rude's Blog

Programming with Swift, iOS, macOS, etc.

Drawing custom views in Swift Playgrounds

2016-12-26 Programming
Easy template to start working on a custom view in Swift Playgrounds Getting the details right in a custom view can require tens or even hundreds of iterations. Building an iOS project, loading the app in the simulator, and checking the results is just too slow. Swift Playgrounds allow you to write your drawing code, and see your results almost instantaneously in Xcode. Just use the following as a starting template, and start drawing! Continue reading

Accessing audio (and other) files stored in the Xcode asset catalog with Swift

2015-10-18 Programming
When working on my “Nap Slide” iOS app, I needed to embed various .wav files in the application. Being new to iOS development, using the asset catalog seemed to be the obvious choice (Google/StackOverflow has led me to believe developers with previous Xcode experience would use application bundles). Accessing images stored in the asset catalog is easy and well documented, accessing other file types (a feature added as of Xcode 7) is not. Continue reading