Assets Catalog
Use Assets.xcassets to manage images, colors, and app icons.
Checklist
- AppIcon set with required sizes for iPhone/iPad
- AccentColor for your app
- Image sets in 1x/2x/3x
Assets catalogs help you organize and optimize your app’s visual assets, making it easier to maintain and update your app’s appearance.
System Symbols
Use SF Symbols to add system-like icons to your app.
Example
Demo.swift
ContentView.swift
App.swift
import SwiftUI
struct SymbolsDemo: View {
var body: some View {
HStack(spacing: 24) {
Image(systemName: "star.fill")
.font(.system(size: 40))
.foregroundStyle(.yellow)
Image(systemName: "heart.fill")
.font(.system(size: 40))
.foregroundStyle(.red)
Image(systemName: "bolt.fill")
.font(.system(size: 40))
.foregroundStyle(.blue)
}
.padding()
}
}
Use SF Symbols to add system-like icons to your app.
Assets Catalog
Example
Demo.swift
ContentView.swift
App.swift
import SwiftUI
struct AssetsDemo: View {
var body: some View {
VStack(spacing: 16) {
RoundedRectangle(cornerRadius: 12)
.fill(.tint)
.frame(height: 80)
.overlay(Text("Tint").foregroundStyle(.white))
HStack(spacing: 16) {
Image(systemName: "photo.fill")
.font(.system(size: 40))
.foregroundStyle(.tint)
Text("Use Assets.xcassets for images and colors")
}
}
.padding()
}
}
Use Assets.xcassets to manage images, colors, and app icons.
Leave a Reply