Internal bridge from Fabric to a registered Swift view.
| 193 | |
| 194 | /// Internal bridge from Fabric to a registered Swift view. |
| 195 | @objc(EffectUIHostSlot) |
| 196 | @MainActor |
| 197 | public final class _EffectUIHostSlot: NSObject { |
| 198 | private let hosted: any EffectUIHostedView |
| 199 | |
| 200 | // The host's subclass for `name` exists only once `register` added it. |
| 201 | @objc public init( |
| 202 | name: String, |
| 203 | emit: @escaping (String, [String: Any]) -> Void, |
| 204 | invalidateSize: @escaping () -> Void |
| 205 | ) { |
| 206 | hosted = EffectUI.views[name]!(EffectUIContext(emit: emit, invalidateSize: invalidateSize)) |
| 207 | super.init() |
| 208 | } |
| 209 | |
| 210 | @objc public var view: EffectUIPlatformView { |
| 211 | hosted |
| 212 | } |
| 213 | |
| 214 | @objc public var contentView: EffectUIPlatformView? { |
| 215 | hosted.contentView |
| 216 | } |
| 217 | |
| 218 | @objc public func update(_ changed: [String: Any]) { |
| 219 | hosted.update(changed) |
| 220 | } |
| 221 | |
| 222 | @objc(command:args:) public func command(_ name: String, args: [Any]) { |
| 223 | hosted.command(name, args) |
| 224 | } |
| 225 | } |
nothing calls this directly
no outgoing calls
no test coverage detected