I am using the Yelp API and this is the search method:
func searchWithTerm(term: String, success: (AFHTTPRequestOperation!, AnyObject!) -> Void, failure: (AFHTTPRequestOperation!, NSError!) -> Void) -> AFHTTPRequestOperation! {
// For additional parameters, see http://ift.tt/QXVBgL
var parameters = ["term": term, "ll": "37.77493,-122.419415"]
return self.GET("search", parameters: parameters, success: success, failure: failure)
}
This is currently hardcoded with the given ll parameter. I have a the user's location stored in a different VC and when i try to pass in the lat and long to replace the hardcoded values, I get errors...
What am i doing wrong? It should be rather simple to pass in a value of double...
Aucun commentaire:
Enregistrer un commentaire