Files
suixinkan_uikit/suixinkan/UI/Common/UIImageView+Remote.swift
汉秋 005cac3f78 Implement profile tab with Android-aligned flows and OSS upload.
Add personal info page, account switch, real-name auth, withdrawal settings, session cache extensions, AlibabaCloudOSS SPM, and unit tests.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-06 16:01:05 +08:00

21 lines
577 B
Swift
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//
// UIImageView+Remote.swift
// suixinkan
//
import Kingfisher
import UIKit
extension UIImageView {
/// URL
func loadRemoteImage(urlString: String?, placeholderColor: UIColor = UIColor(hex: 0xEFF6FF)) {
backgroundColor = placeholderColor
let trimmed = urlString?.trimmingCharacters(in: .whitespacesAndNewlines) ?? ""
guard let url = URL(string: trimmed), !trimmed.isEmpty else {
image = nil
return
}
kf.setImage(with: url, placeholder: nil)
}
}