onevcat / Kingfisher

A lightweight, pure-Swift library for downloading and caching images from the web.
MIT License
23.41k stars 2.66k forks source link

Need help "converting" .border(.primary) from SwiftUI to UIKit :O #2278

Open smhk opened 2 months ago

smhk commented 2 months ago

Cheers, I have this in SwiftUI

                 .resizable()
                 .aspectRatio(contentMode: .fit)
                 .frame(width: 72, height: 72, alignment: .center)
                 .border(.primary)

then for UIKit,

                let rp = ResizingImageProcessor(
                    referenceSize: CGSize(width: 72 * UIScreen.main.scale, height: 72 * UIScreen.main.scale),
                    mode: .aspectFit
                )

                let bp = BorderImageProcessor  ... ?!?#@#@!??

                im.kf.setImage(with: u, options: [rp, .cacheOriginalImage])
                im.url = u

I'm stumped on how to implement .border(.primary)

Thanks in advance if anyone can answer, cheers