// Default style with message
AKLoadingView(
style: .default,
message: "Loading your data..."
)
// Aurora style
AKLoadingView(style: .aurora)
// Progress with percentage
AKLoadingView(
style: .progress(0.65),
message: "Uploading files..."
)
// Skeleton loading
AKLoadingView(
style: .skeleton,
skeletonCount: 5
)
// Minimal inline
AKLoadingView(
style: .minimal,
message: "Please wait..."
)// Network error with retry
AKErrorView(
title: "Connection Failed",
description: "Please check your internet connection.",
style: .alert,
retryAction: {
await fetchData()
}
)
// Server error
AKErrorView(
title: "Server Error",
description: "Our servers are experiencing issues.",
systemImage: "exclamationmark.icloud",
style: .gradient,
retryAction: { retry() }
)
// Permission denied (no retry)
AKErrorView(
title: "Access Denied",
description: "You don't have permission.",
systemImage: "lock.fill",
style: .minimal
)// With action button
AKEmptyStateView(
title: "No Photos",
description: "Start by taking your first photo.",
systemImage: "photo.on.rectangle.angled",
style: .illustrated,
action: ("Add Photo", { openCamera() })
)
// Search results
AKEmptyStateView(
title: "No Results",
description: "Try adjusting your search.",
systemImage: "magnifyingglass",
style: .minimal
)
// Custom image
AKEmptyStateView(
title: "Empty Collection",
description: "Items will show up here.",
image: Image("custom-empty"),
style: .gradient,
action: ("Browse Items", { showBrowser() })
)// Automatic presentation
ContentView()
.presentPaywallIfNeeds
.environmentObject(config)
// Trigger paywall programmatically
if !config.isSubscripted {
config.paywall = true
}
// Paywall type is auto-selected based on config
// - .single: Single product paywall
// - .multiple: Multi-product paywall
// Automatically checks subscription on dismiss// Present welcome screen
ContentView()
.presentWelcomeIfNeeds(
$showWelcome,
configuration: config
)
// Features are configured in AKConfig
let config = AKConfig.AKConfigBuilder()
.setFeaturesModels([
AKFeatureModel(
icon: "sparkles",
title: "New Feature",
subtitle: "Amazing new capability"
)
])
.build()
// Automatically shows AKWelcomeView with features