and that way, we can give you users who share your hobby that are near you.
And to make sure that you get some results or help make sure we've defined
near you as within 1,000 miles of you, which is a pretty big scope,
but want to make sure that you can be pretty successful.
So define near you as within 1,000 miles of you, and also,
since we are passing in your lat and long, we take that opportunity to go update your
lat and long inside of the user's table in the database in the backend.
So if you change your location and you press a hobby
on the scene with the map in it, then your location should also get updated.
It says you're working on this project, maybe you're working on it with a friend,
or maybe you have two devices, or a simulator and a device, and
you want to play with the application a little bit.
Just be aware that your location will get updated when you make this call to go
fetch users with hobby.
Okay, so, now that we've made sure we have
a good user ID, and we can get down here.
Otherwise, if we don't have a good user ID, then we'll just throw up an alert
onto the screen and say, please log in before selecting a hobby.
If you don't have a current user ID, that means you probably didn't log in and
it probably didn't get stored into NSUserDefaults, so when we try to get it
out of UserDefaults here, it'll be nil and will fall into the discard statement.
So it makes sense to say, please log in before selecting a hobby.
We need to add an OK button, so that the user can get rid of that alert.
So, we say, let okAction = UIAlertAction,
title will be Dismiss, so they can dismiss the alert.
The style will be a UIAlertActionStyle.Default, so
it should just look like those little white pop-up boxes that we're all used to.