mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-09 15:51:05 +00:00
ViewController: added forEachController
This commit is contained in:
parent
44c84bc116
commit
cfc191bc16
@ -398,12 +398,19 @@ open class ViewControllerPresentationArguments {
|
||||
switch context {
|
||||
case .current:
|
||||
self.presentationContext.present(controller, on: PresentationSurfaceLevel(rawValue: 0), completion: completion)
|
||||
completion()
|
||||
case let .window(level):
|
||||
self.window?.present(controller, on: level, blockInteraction: blockInteraction, completion: completion)
|
||||
}
|
||||
}
|
||||
|
||||
public func forEachController(_ f: (ContainableController) -> Bool) {
|
||||
for (controller, _) in self.presentationContext.controllers {
|
||||
if !f(controller) {
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public func presentInGlobalOverlay(_ controller: ViewController, with arguments: Any? = nil) {
|
||||
controller.presentationArguments = arguments
|
||||
self.window?.presentInGlobalOverlay(controller)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user