質問がございます。よろしくお願い申し上げます。
###前提・実現したいこと
TableViewの画像が表示されないため改善したい。
解決策
cell.artworkImageView.image = result["artworkUrl100"] as? String
をif文以下に書き込む
結果
表示されません。。
###ソースコード
Swift
1 override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { 2 let cell = tableView.dequeueReusableCellWithIdentifier("cell", forIndexPath: indexPath) as! ListCell 3 if let result = results?[indexPath.row] { 4 if let artworkUrl = result["artworkUrl100"] as? String { 5 cell.artworkImageView.setImageWithURL(NSURL(string: artworkUrl)!) 6 } else { 7 cell.artworkImageView.image = nil 8 } 9 cell.trackLabel.text = result["trackName"] as? String 10 cell.artistLabel.text = result["artistName"] as? String 11 } 12 return cell 13 } 14
失礼致します。
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2015/10/25 09:54