swift2.0后请使用var location:CLLocation = locations[locations.count-1] as! CLLocation
2015-08-03
func ios8() -> Bool{
var systemVersion = (UIDevice.currentDevice().systemVersion as NSString).floatValue
println(systemVersion)
return systemVersion >= 8.0
}
var systemVersion = (UIDevice.currentDevice().systemVersion as NSString).floatValue
println(systemVersion)
return systemVersion >= 8.0
}
2015-08-03
如果输出Error Domain=kCLErrorDomain Code=0 "The operation couldn’t be completed. (kCLErrorDomain error 0.)",是因为模拟器设置不支持地理位置变化。 可以在模拟工具的菜单栏,Debug->Location->Freeway Device
2015-08-03
运行时一片黑的同学,请在Attributes inspector 下的 View Controller 勾选 Is Initial View Controller
2015-07-18