GIF API를 이용해서 GIF검색하는 앱을 만들고, RxSwift를 도입해보자.
Ultimate Guide to GIFs in iOS.
GIF이미지를 띄우기위해서 외부 라이브러리가 필요해졌다.
pod init
을 통해서 podfile
을 만들어준다.
vi podfile
을통해 podfile
을 열고 수정해준다.
pod 'FLAnimatedImage'
를 넣어줬다.
pod install
을통해 설치해줬다. 이후부턴 xcworkspace
를 통해 작업해야한다.
import UIKit
import FLAnimatedImage
class SearchCollectionViewCell: UICollectionViewCell {
// MARK: - IBOutlets
@IBOutlet weak var thumbnailImageView: FLAnimatedImageView!
}
SearchCollectionViewCell
의 UIImageView
를 FLAnimatedImage
로 바꿔주었다.
inspector에서도 class지정을 꼭 해줘야한다.
https://s3-us-west-2.amazonaws.com/secure.notion-static.com/0a723164-989f-4136-af35-61d08bcadc76/__2021-05-06__12.23.03.mov