我用普通的
尝试了这个 winnerCell.challengeBannerURL.af_setImage(withURL: URL(string: winnerchallengesData[indexPath.row].challengeDetails.challenge_banner_url)!)
它在正常通话中工作但在AlamofireImage中没有工作
let data = try? Data(contentsOf: URL(string: self.winnerchallengesData[indexPath.row].winnerDetails.profileURL)!)
// winnerCell.userProfile.image = UIImage(data:data!)
//
答案 0 :(得分:0)
我解决了这个问题来自服务器的数据是在流中所以手动我必须在AlamofireImage中设置它
DataRequest.addAcceptableImageContentTypes(["image/jpg","image/png","binary/octet-stream"])