https://www.cnblogs.com/36bian/p/5237138.html Allow Arbitrary Loads 拼写不对吧
什么问题?
我的也是出不来,
func locationManager(_ manager: CLLocationManager, didUpdateLocations locations: [CLLocation])
{
let location:CLLocation = locations[locations.count - 1] as CLLocation
if (location.horizontalAccuracy > 0) {
print(location.coordinate.latitude)
print(location.coordinate.longitude)
locationManager.stopUpdatingLocation()
}
}
现在代理方法换成这个了,但是没执行进来,而且权限询问也不跳出来,关于privcy 我也设置了
没事儿,网络问题 , 不说技术问题
在google里搜索天气PSD,然后自己处理
controllers没关联?
app store里面搜索xcode
source 'https://github.com/CocoaPods/Specs.git' platform :ios, '8.0' use_frameworks! target 'ProjectName' do pod 'Alamofire', '~> 2.0' pod 'SwiftyJSON', '~> 2.3.0' pod 'FastImageCache', '~> 1.3', :inhibit_warnings => true end
类似上面的格式
什么?
图片没有编译吧
用cocoapods下载,具体自己去查
FCPX
已解决,请求参数增加appid字段, appid上openweather注册一个账号,就有了!!
建议结合老师最新的源码学习:请求地理位置信息代码如下 :
func requestLocation() {
locationManager.requestWhenInUseAuthorization()
locationManager.requestLocation()
}
infolist中添加的如下:NSLocationWhenInUseUsageDescription :Location is required to retrieve the weather info for your current place.
最新版的不是用了viewmode 这样子的设计模式.. 那个绑定viewmode 看不懂 .不晓得observer是怎么赋值的.
你改成她提示的那样试试看 改成这个((AFHTTPRequestOperation?, NSError) -> Void)?
在failure: { (operation: AFHTTPRequestOperation!,
error: NSError!) in
println("Error: " + error.localizedDescription)
})这里
改为
failure: { (operation: AFHTTPRequestOperation?,
error: NSError) in
println("Error: " + error.localizedDescription)
})
你看看是不是你写的位置有问题,没代码不好回答啊
Podfile中要改版本为
platform :ios,'8.0'
pod 'AFNetworking', '~>2.6.3'
不然安装的是最新版的
有可能是iOS版本问题造成的
找到原因了,
let locationManager:CLLocationManager = CLLocationManager()
没有定义成成员变量,有些不解