I'm conforming my application to use multiple windows on iPadOS with iOS 13, as far as I know I cannot access to UIApplication
window directly due to it's deprecation, how can I get the top most view controller?
Until iOS12 I use this working solutions, can you suggest an alternative?
+(UIViewController *)topMostViewController
{
UIViewController *vc = [[UIApplication sharedApplication].delegate.window rootViewController];
while(vc.presentedViewController)
{
vc = vc.presentedViewController;
}
return vc;
}