DispatchQueue.main.async { }
This cause error in my Extension
How I use it
let topController = UIApplication.shared.topMostViewController()
You can try to like below
DispatchQueue.main.async { let topController = UIApplication.shared.topMostViewController() }
or alternatively you can use block. You can’t return directly from async operation.
func topMostViewController(onSuccess: (UIViewController) -> ()) { ... }
Copyright © 2021 Jogjafile Inc.
You can try to like below
or alternatively you can use block. You can’t return directly from async operation.