Created
October 5, 2015 03:47
-
-
Save thedore17/d854184ae7ca1ecbda15 to your computer and use it in GitHub Desktop.
open govtrack to district
This file contains 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
func setWebViewMapWith(state: String, district: String) { | |
if (district != "0") { | |
districtUrl = "https://www.govtrack.us/congress/members/embed/mapframe?state=\(state)&district=\(district)" | |
}else { | |
districtUrl = "https://www.govtrack.us/congress/members/embed/mapframe?state=\(state)" | |
} | |
setWebViewUrl(districtUrl) | |
} | |
func setWebViewUrl(url: String) { | |
let targetUrl = NSURL (string: districtUrl); | |
let requestObj = NSURLRequest(URL: targetUrl!); | |
districtWebView.loadRequest(requestObj); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment