We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents e20a266 + 8212cd1 commit f150f76Copy full SHA for f150f76
1 file changed
Sources/DebugMenu/Plugin/DebugMenu/ViewControllerDebugItem.swift
@@ -9,11 +9,11 @@ public struct ViewControllerDebugItem<T: UIViewController>: DebugItem {
9
public init(
10
title: String? = nil,
11
presentationMode: PresentationMode = .push,
12
- builder: @escaping ((T.Type) -> T) = { $0.init() }
+ builder: @escaping @MainActor (T.Type) -> T = { $0.init() }
13
) {
14
debugItemTitle = title ?? String(describing: T.self)
15
action = .didSelect { controller in
16
- let viewController = builder(T.self)
+ let viewController = await builder(T.self)
17
switch presentationMode {
18
case .present:
19
await controller.present(viewController, animated: true)
0 commit comments