当我单击 iPhone 中的 btnLogin 时,xCode 显示错误:
线程 5:EXC_BREAKPOINT(代码=1,子代码=0x10025c76c)
这是我的代码
@IBOutlet weak var abc: UILabel!
...
@IBAction func btnLogin(sender: UIButton) {
var jsonResult = AnyObject?()
let urlAsString = "lifewinner2015.dlinkddns.com/SERVER/user?function=login&username=Shing&password=123456789"
let url = NSURL(string: urlAsString)
let urlSession = NSURLSession.sharedSession()
let jsonQuery = urlSession.dataTaskWithURL(url!, completionHandler: {data, reponse, error -> Void in
if (error != nil) {
print("error")
}
do {
jsonResult = try NSJSONSerialization.JSONObjectWithData(data!, options: .AllowFragments) as! NSDictionary
let jsonAbc: String! = jsonResult!["return"] as! String
dispatch_async(dispatch_get_main_queue(), {
self.abc.text = jsonAbc
})
} catch …Run Code Online (Sandbox Code Playgroud) 我已经绘制了折线,但我不知道什么编码可以删除谷歌地图中的跟踪折线。我正在尝试在下面进行一些编码。
这是行不通的。
var polyline = GMSPolyline()
polyline.map = nil
Run Code Online (Sandbox Code Playgroud)
这正在努力删除跟踪的多段线,但是当我制作标记并点击它时,标记无法播种信息窗口。
mapView.clear()
Run Code Online (Sandbox Code Playgroud)
谢谢