Skip to content

armgit / cindy

Public Imported from GitHub
0

Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。

690 B
Raw Blame
import ExpoModulesCore
import UIKit

/// Transparent probe sharing the React container's bounds and window.
final class CindyWindowLayoutView: ExpoView {
  let onGeometryChange = EventDispatcher()
  private let geometry = CindyWindowGeometry()
  required init(appContext: AppContext? = nil) {
    super.init(appContext: appContext)
    isUserInteractionEnabled = false
    accessibilityElementsHidden = true
    geometry.onChange = { [weak self] value in
      guard let payload = value as? [String: Any] else { return }
      self?.onGeometryChange(payload)
    }
    addSubview(geometry)
  }
  override func layoutSubviews() {
    super.layoutSubviews()
    geometry.frame = bounds
  }
}