Slather logo

Coverage for "Array+Extension.swift" : 100.00%

(3 of 3 relevant lines covered)

RouteComposer/Classes/Extensions/Array+Extension.swift

1
//
2
// RouteComposer
3
// Array+Extension.swift
4
// https://github.com/ekazaev/route-composer
5
//
6
// Created by Eugene Kazaev in 2018-2022.
7
// Distributed under the MIT license.
8
//
9
// Become a sponsor:
10
// https://github.com/sponsors/ekazaev
11
//
12
13
import Foundation
14
import UIKit
15
16
/// - Extension of an `Array` of the `UIViewControllers` is to check if all of them can be dismissed.
17
public extension Array where Element: UIViewController {
18
19
    /// Returns `true` if all `UIViewController` instances can be dismissed.
20
    var canBeDismissed: Bool {
197x
21
        nonDismissibleViewController == nil
197x
22
    }
197x
23
24
}