AlamofireImageというライブラリを使っていたのですが、
少しチェックしていなかったら画像が読み込まれなくなってしまいました。
UIImageViewは問題なく表示されており、アプリが途中で落ちることもありません。
swift3がリリースされた直後には実行を確認しています。
Swift
1import AlamofireImage //github: https://github.com/Alamofire/AlamofireImage
この時、AlamofireImage (3.0.0)
を使っていたのですが、
githubのページを確認したところ、AlamofireImage (3.1.0)
が登場しているようでした。
しかし、pod install
ではインストールできなかったため、
エラーに従ってpod repo update
を行なったのち、
AlamofireImage (3.1.0)
にアップデートを行いました。
以下は、githubに載っていたサンプルを少しだけ変更したもので、
以前から使っていたものでした。
Swift
1let frame = CGRect(x: CGFloat(i)*scW, y: 0, width: scW, height: scW*2/3) 2let imgView = UIImageView(frame: frame) 3 4let downloader = ImageDownloader() 5let urlRequest = URLRequest(url: URL(string: storeDictionary["photo_url" + String(i+1)]!)!) 6 7downloader.download(urlRequest) { response in 8 print(String(i+1)) 9 print(response.request) 10 print(response.response) 11 debugPrint(response.result) 12 13 if let myImage = response.result.value { 14 imgView.image = myImage 15 } 16} 17 18myScrollView.addSubview(imgView)
downloader.download(urlRequest) { response in
以降の部分が実行されていないように思います。
print(String(i+1))
も表示されません。
ここで、
downloader.download(urlRequest) { response in
の行に、
Breakpointを追加して実機で実行したところ、
warning: could not load any Objective-C class information. This will significantly reduce the quality of type information available.
というwarningが表示されました。
また、関係あるかは分かりませんが、
file:///Users/*****/Podfile.lock: warning: Missing file: /Users/*****/Podfile.lock is missing from working copy
というエラーも表示されるようになってしまいました。
原因が分からず困っています。よろしくお願いいたします。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。