Skip to content

Commit

Permalink
Updated GameViewController to handle new API JSON responses
Browse files Browse the repository at this point in the history
  • Loading branch information
jason-rutherford committed Aug 23, 2015
1 parent 7661613 commit 52e5cb8
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions Pointing/GameViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,14 @@ class GameViewController: UIViewController, CLLocationManagerDelegate {
println("Error acquiring locations: \(error)")
} else {
let locs = JSON as! [AnyObject]
let firstLoc = locs[0] as! [AnyObject]
let firstLoc = locs[0]

let firstLocID = firstLoc[0] as! Int
let firstLocName = firstLoc[1] as! String
let firstLocAddress = firstLoc[2] as! String
let firstLocLat = firstLoc[3] as! Double
let firstLocLng = firstLoc[4] as! Double
let firstLocAlt = firstLoc[5] as! Double
let firstLocID = firstLoc["id"] as! Int
let firstLocName = firstLoc["name"] as! String
let firstLocAddress = firstLoc["address"] as! String
let firstLocLat = firstLoc["lat"] as! Double
let firstLocLng = firstLoc["lng"] as! Double
let firstLocAlt = firstLoc["elevation"] as! Double

self.lblLocationName.text = firstLocName

Expand Down

0 comments on commit 52e5cb8

Please sign in to comment.