ismai117 / kottie

Render After Effects Animations Library - Compose Multiplatform | Inspired by Airbnb/Lottie

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

in ios Don't show

liuhongjian0316 opened this issue · comments

elements are not rendered,It should be displayed in the red box.
Snipaste_2024-04-29_01-21-38
Snipaste_2024-04-29_01-23-30

Try this out inside Xcode

Ref: airbnb/lottie-ios#1627

import Foundation
import UIKit
import Lottie


class AppDelegate : NSObject, UIApplicationDelegate {
    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {
        LottieConfiguration.shared.renderingEngine = .mainThread
        return true
    }
}
import SwiftUI

@main
struct iOSApp: App {
    
        @UIApplicationDelegateAdaptor(AppDelegate.self) var appDelegate
    
	var body: some Scene {
		WindowGroup {
			ContentView()
		}
	}
    
}