Thoughts of an Eaten Sun

through the mind of kyle tolle

Simple Location

Last night, I got the itch to create an iOS application to display my current position on the Earth (I haven’t managed to get to Mars yet) in the familiar terms of latitude and longitude.

I began by watching a video tutorial, which was part of a set I’d purchased a little while back. The tutorial was written for someone to use an Objective-C iOS project, but I used my previous iOS projects and Google searches to write it in Swift instead.

Through the course of my searches, I found a video tutorial on YouTube which gave me the idea to also display the city and state. It was a demonstration for a Swift application, which was right up my alley. Showing the city and state would make the demo a little more human readable. Turned out to be pretty straight-forward! Also a good way to make sure the latitude and longitude aren’t total crap.

I don’t have the application available on the App Store, but here’s a screenshot:

Screenshot of Simple Location

You can also check out the source code on GitHub.

I’m hoping to explore other location based applications (web and iOS) in the future, so this is a good stepping stone.