After a while I've found that one method with setting label.text callef from viewModel was called from globalQueue from some reasen. That caused that delay. I don't know yet why on iOS 11 and 12 that worked perfectly. I had to call that method from mainQueue and it woked perfectly for me. I'll have to check changes in iOS 13 about GCD.
It's Swift, I'm using .xib.
func pushSomeViewController(with model: SomeViewModel) {
let viewModel = OtherViewModel(coordinatorDelegate: self, model: model)
let viewController = OtherViewController(viewModel: viewModel)
rootViewController.pushViewController(viewController, animated: true)
}That method is called on main thread.
But it's not Moya foult, like I said I've commented all networking and pushed clear viewController and it still has delay.
It's my bad I switched them here by mistake. And API is just base class for networking(Moya) with setup of provider and plugins. I've checked that even after cutting off networking layer from application transition still has delay.
ViewController init: convenience init(viewModel: SomeViewModel) {
self.init()
self.viewModel = viewModel
self.viewModel.viewDelegate = self
}ViewModel init: init(model: SomeRenderable, coordinatorDelegate: SomeCoordinatorDelegate?, api: Api = Api()) {
self.model = model
self.coordinatorDelegate = coordinatorDelegate
self.api = api
}
Next VC has background color. BTW with white background color issue with transition look a bit different. It would lag animation, in my scenario it works correctly but push action happens after delay.
Yes I tried. It doesn't help because it is already called on main thread.
func pushSomeViewController(with model: SomeViewModel) {
let viewModel = OtherViewModel(coordinatorDelegate: self, model: model)
let viewController = OtherViewController(viewModel: viewModel)
rootViewController.pushViewController(viewController, animated: true)
}It is called from main thread. It works perfectly on iOS 11 and 12 but it lags on iOS 13 idk why.That code is placed in coordinator and it's called by protocol delegate after collectionViewCell is tapped.