TTBaseUIKit provides two SwiftUI image components: TTBaseSUIImage for asset/icon images with corner radius and aspect ratio, and TTBaseSUIAsyncImage for URL-based remote images with placeholder and error states.
Class
Source
Use Case
TTBaseSUIImage
Asset / AwesomePro icon
Static UI images, icons, badges
TTBaseSUIAsyncImage
URL string
Remote images (avatars, product photos)
🖼 TTBaseSUIImage
// From asset name
TTBaseSUIImage(imageName: "hero_banner")
.scaledToFill()
.clipped()
.cornerRadius(12)
// System SF Symbol
TTBaseSUIImage(systemName: "star.fill")
.foregroundStyle(.yellow)
.frame(width: 24, height: 24)
// AwesomePro icon
TTBaseSUIImage(awesomeIcon: .bell, color: .systemBlue)
.frame(width: 32, height: 32)
// Circle avatar
TTBaseSUIImage(imageName: "avatar")
.scaledToFill()
.frame(width: 56, height: 56)
.clipShape(Circle())
// With corner radius
TTBaseSUIImage(imageName: "product_thumb")
.scaledToFill()
.frame(width: 80, height: 80)
.cornerRadius(8)
.clipped()
Pro Tip: Use .clipShape(Circle()) instead of .cornerRadius() for perfect circular avatars — it handles odd frame sizes gracefully. Always pair TTBaseSUIAsyncImage with a .frame() constraint to prevent layout jumps during loading.