TrashMapper - iOS Project - Development - Part4
Get User Location and Tag Location View Added.
This post will be brief but cover some key points moving forward in this project.
From my previous post outlining some key steps:
Outline functionality for:
Build out the User Interface
Views coming together nicely. To link the tab bar controllers to other views I used the Relationship Segue -> View Controller.
This site has some nice reference info on how to use tab bar controllers and set their relationships.

In the first stages of building this app, I had it in my head that I was going save user post data on device prior to sending to the cloud.
Last night however, as I lay watching this cinematic masterpiece, I realized I was making the requirements too strict for this initial release.
Instead of having a complex ‘feed’ check where I verify that all posts on device are uploaded to cloud and vice versa, I’m just going to require that the device have good GPS and network connection in order to submit a post.
What I’d also like to tackle soon is building out the Data Model that I plan to upload to firebase when a post is committed. I’ll most likely start with just a picture, string, date, and time.
Here is a first draft that I will revisit.
public struct userPost {
let date: Date //current date
let time: Time //current time
let username: userName //username of who submitted the post
var userLocation: CLLocation //User location (lat/long) to be submitted in post
let imageURL: URL //where to select image either on device or image picker
let catageory: //...some category for trash quantity/type
let description: String //Allow user to write out a short description of tagged location?
}
This last one is self explanatory. Add buttons for both creating a user post and zooming to current location.