Created
June 29, 2016 20:51
-
-
Save fongd/a50af714c1df4d9a3fe3a168bb094960 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// set up the data that will be displayed in the info table | |
let info = [ | |
"sumLengthKm": "Length", | |
"trailType": "Trail Type", | |
"activities": "Activities", | |
"environment": "Environment", | |
"resources": "Other Resources" | |
] | |
for (key, value) in info { | |
let data = NSDictionary() | |
let headerLabel: String! = value | |
var content: String! | |
if key == "resources" { | |
// for resources, we need to collect the values of websiteurl[1-4] and | |
// groupname[1-4] for display | |
} else { | |
content = trailSegment?.valueForKey(key) as? String | |
} | |
data.setValue(headerLabel, forKey: "headerLabel") | |
data.setValue(content, forKey: "content") | |
infoTableData.append(data) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment