I study how to make iOS app by codingforentrepreneurs.com
nowadays I study Alamofire. Xcode is 8.3.3
this is error command. I don't understand error command.
Cannot convert value of type '(NSURLRequest, HTTPURLResponse?, AnyObject?, NSError?) -> Void' to expected argument type '(DataResponse) -> Void'
this is ViewController.swift
import UIKit
import Alamofire
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
var rTest = Alamofire.request("http://ec2-52-78-193-10.ap-northeast-2.compute.amazonaws.com", method: .get)
.responseJSON(completionHandler: isComplete)
}
func isComplete(request:NSURLRequest, response: HTTPURLResponse?, data: AnyObject?, error:NSError?) -> Void {
print(response!.statusCode)
print(data)
print(error)
print(request)
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
}
i don't know what is problem. could you help me?
AnyObjectandNSErrorlooks like an outdated tutorial. - vadian