请求(http://t.weather.sojson.com/api/weather/city/101030100) json格式
注意:
1、iOS 10.0以后要求都使用https请求,不然会被拒。当http请求时,将App Transport Security Settings里:Allow Arbitrary Loads,设置成YES。
2、https证书校验执行代理方法
- (void)connection:(NSURLConnection *)connection willSendRequestForAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge;
请求:
1、使用AFNetworking 对接口请求
2、创建FBBHTTPRequest对NSMutableURLRequest进行封装。
加载提示:
1、使用MBProgressHUD加载提示框
2、使用UIImageView的animationImages添加一组图片。使用startAnimating/stopAnimating实现动画效果。