Mahmud Ahsan
Feb 1, 2021

--

I was using SwiftUI 1.0. On SwiftUI 2.0, try this one to get the root view controller.

`UIApplication.shared.windows.first?.rootViewController`

--

--

Mahmud Ahsan
Mahmud Ahsan

Written by Mahmud Ahsan

I'm a software engineer passionate about web and mobile app development.

No responses yet