mirror of
https://github.com/divkit/divkit.git
synced 2026-06-06 20:07:59 +00:00
14 lines
379 B
Swift
14 lines
379 B
Swift
#if os(iOS)
|
|
import UIKit
|
|
|
|
@objc(ComposeDivKitFactory) public class ComposeDivKitFactory: NSObject {
|
|
@objc public static func makeDivKitView(_ jsonString: String) -> UIView {
|
|
let view = DivView(divKitComponents: DivKitComponents())
|
|
Task {
|
|
await view.setSource(DivViewSource(kind: .data(Data(jsonString.utf8)), cardId: "Sample"))
|
|
}
|
|
return view
|
|
}
|
|
}
|
|
#endif
|