Проверка шаблона шины для iOS
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

54 lines
1.2KB

  1. import BusX
  2. import MeetupIdX
  3. import MicX
  4. import SwiftUI
  5. import UIKit
  6. struct Content: View {
  7. var body: some View {
  8. MeetupId.V()
  9. Divider()
  10. MicItem.V()
  11. }
  12. }
  13. @UIApplicationMain
  14. class AppDelegate: UIResponder, UIApplicationDelegate
  15. {
  16. let meetupIS = MeetupId.Service(.init())
  17. var window: UIWindow?
  18. func application(
  19. _ application: UIApplication,
  20. didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
  21. ) -> Bool {
  22. window = UIWindow(frame: UIScreen.main.bounds)
  23. let vc = UIViewController()
  24. addSwiftUIViewAsChild(swiftUIView: Content(), parent: vc.view)
  25. vc.view.backgroundColor = .white
  26. window?.rootViewController = vc
  27. window?.backgroundColor = UIColor.white
  28. window?.makeKeyAndVisible()
  29. /**/print("ИГР App.didFLWO")
  30. //testMic1()
  31. testMic2()
  32. return true
  33. }
  34. func testMic1() {
  35. DispatchQueue.main.asyncAfter(deadline: .now() + 2) {
  36. Bus.send(Mic.K.isActive, true)
  37. }
  38. DispatchQueue.main.asyncAfter(deadline: .now() + 5) {
  39. Bus.send(Mic.K.isActive, false)
  40. }
  41. }
  42. func testMic2() {
  43. DispatchQueue.main.asyncAfter(deadline: .now() + 2) {
  44. Bus.send(Mic.K.activityDate, Date() + 5)
  45. }
  46. }
  47. }