2017-02-09 1 views
0

프로젝트에서 xcode 8.1으로 SDWebImage을 사용하고 있습니다. 원격 URL에서 다운로드 한 이미지를 가져와 tableview의 동적 인 cell의 이미지보기에 표시 할 수 있습니다.TableView의 SDWebImage 위로 스크롤

tableview에서 위로 스크롤하면 이미지가 축소됩니다.

+0

코드를 공유해주십시오. 코드 조각이 많은 도움이 될 것입니다. –

답변

0

나는이 코드를 사용하여 저를 위해 일했습니다.

func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { 
      let cellId:String = "cellid" 
      let cell = tableView.dequeueReusableCell(withIdentifier: cellId, for: indexPath) as! customcell 
      let strUrlProfilepic = your image url path 

     self.yourImageView.af_setImage(withURL: strUrlProfilepic, placeholderImage: UIImage(named: "PlaceholderImage.jpeg")) 
      return cell 
     } 
+0

위의 코드를 .. self.yourImageView.af_setImage (withURL : strUrlProfilepic, placeholderImage : UIImage ("PlaceholderImage.jpeg"))) 사용했습니다. 이제 작동 중입니다. – Rupesh

+0

내 대답이 도움이된다면 내 대답을 수락하십시오. 감사합니다. –