This article is not available in your language, so the default english version is displayed instead.

#Working with SwiftUI

The SDK also provides some ways to show a paywall using SwiftUI.

#createPaywall

func createPaywall(access: Access, pageType: String, percent: Int?) -> some View

Presents a paywall. The paywall will print above the View on which this modifier is applied.

#createPaywall

func createPaywall(pageType: String) -> some View

Presents a paywall in custom mode
This method returns a View object containing the paywall content after its been rendered.

⚠️ The resulting view can be moved or scaled down in width, but will automatically redraw itself to a height that can fit its content. Any attempt at height modification might break its layout.