mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-04-26 11:28:38 +03:00
19 lines
380 B
Swift
19 lines
380 B
Swift
import AppKit
|
|
|
|
extension NSView {
|
|
|
|
func subviews(withClassName name: String) -> [NSView] {
|
|
var result = [NSView]()
|
|
|
|
for subview in subviews {
|
|
if String(describing: type(of: subview)) == name {
|
|
result.append(subview)
|
|
}
|
|
|
|
result += subview.subviews(withClassName: name)
|
|
}
|
|
|
|
return result
|
|
}
|
|
}
|