I have an array of UIViewController in my protocol
var viewControllers: [MyViewController] { get }
I want to get the index of item with specific ViewController
let idfx = viewModel.viewControllers.index(of: viewController as! MyViewController)
But the type of idfx is Array.index.
How can I get the index of an array element as an Int?