0
私はいくつかの問題を抱えています。エラー - 「タイプの引数リストで 『dataTask』を起動することはできません...」
// Create a datatask and pass in the request
let dataTask = session.dataTask(with: request, completionHandler: { (data:NSData?, response:URLResponse?, error:Error?) in
// Get a reference to the image view element of the cell
let imageView = cell.viewWithTag(1) as! UIImageView
// Create an image onject from the data and assign it into the ImageView
imageView.image = UIImage(data: data!)
})
私は、これは誤りである2行目にエラーを取得しています:私はこの問題を解決するにはどうすればよい
コード怒鳴るのこのセクションをチェックしてください!前もって感謝します!
'変更してみてください、レスポンス、エラー。 completionHandler):(とメンバーのdataTaskへのあいまいな参照 - 今、私はエラーを取得していますで、{(データ、応答、エラー):リクエスト、completionHandler: – OOPer
は@OOPer [OK]を、ので、ここで更新されたコードだdataTask = session.dataTask(としましょうあなたの代わりにNSURLRequest' 'のURLRequest''助けを – iFunnyVlogger
、あなたの両方!それは働きました! –