00486e9499
Co-authored-by: Samuel Newman <mozzius@protonmail.com> Co-authored-by: Eric Bailey <git@esb.lol> Co-authored-by: dan <dan.abramov@gmail.com> Co-authored-by: Hailey <me@haileyok.com>
29 lines
471 B
Swift
29 lines
471 B
Swift
//
|
|
// SheetManager.swift
|
|
// Pods
|
|
//
|
|
// Created by Hailey on 10/1/24.
|
|
//
|
|
|
|
import ExpoModulesCore
|
|
|
|
class SheetManager {
|
|
static let shared = SheetManager()
|
|
|
|
private var sheetViews = NSHashTable<SheetView>(options: .weakMemory)
|
|
|
|
func add(_ view: SheetView) {
|
|
sheetViews.add(view)
|
|
}
|
|
|
|
func remove(_ view: SheetView) {
|
|
sheetViews.remove(view)
|
|
}
|
|
|
|
func dismissAll() {
|
|
sheetViews.allObjects.forEach { sheetView in
|
|
sheetView.dismiss()
|
|
}
|
|
}
|
|
}
|