pod 사이트 설명 복붙했습니다. 그대로 잘 쓰면 되실 거 같고 저는 이걸 테이블뷰에 응용해서 썼습니다.
아마 반복해서 쓰이는 작업에 유용한 것으로 보입니다. 그리고 AF_request랑 비슷해보이는 구조네요.
let url = URL(string:"https://new.thankage.com/test_Kim/pic/\(picName)")
let processor = DownsamplingImageProcessor(size: CountImage.bounds.size)
|> RoundCornerImageProcessor(cornerRadius: 20)
CountImage.kf.indicatorType = .activity
CountImage.kf.setImage(
with: url,
placeholder: nil,
options: [
.processor(processor),
.scaleFactor(UIScreen.main.scale),
.transition(.fade(1)),
.cacheOriginalImage
])
{
result in
switch result {
case .success(let value):
print("Task done for: \(value.source.url?.absoluteString ?? "")")
case .failure(let error):
print("Job failed: \(error.localizedDescription)")
}
}
'IOS' 카테고리의 다른 글
| IOS] background Color와 border가 일치하지 않을 때 //.clipsToBounds (0) | 2023.12.05 |
|---|---|
| IOS] ViewController간 정보 보내기 (0) | 2023.10.26 |
| IOS] 팝업 창 만들기 (2) | 2023.10.26 |
| IOS] FrameWork 추가 및 수정하는 방법 (0) | 2023.10.24 |
| IOS] storyboard SCROLLVIEW 구현 및 수정 방법 (0) | 2023.10.24 |