KingFisher で UIButtonに画像を設定する
KingFisherでUIButtonにリモート画像を設定するには、buttonTypeをカスタムに設定します。
let button = UIButton(type: .custom)
button.kf.setImage(with: url, for: .normal)
これでオッケー。
🐣
フリーランスエンジニアです。
お仕事のご相談こちらまで
[email protected]
Core MLを使ったアプリを作っています。
機械学習関連の情報を発信しています。
Author And Source
この問題について(KingFisher で UIButtonに画像を設定する), 我々は、より多くの情報をここで見つけました https://qiita.com/john-rocky/items/c2316a4ba23b20503934著者帰属:元の著者の情報は、元のURLに含まれています。著作権は原作者に属する。
Content is automatically searched and collected through network algorithms . If there is a violation . Please contact us . We will adjust (correct author information ,or delete content ) as soon as possible .