приложение работает полностью на iPad. />
Что я попробовал:
- Добавленная сцена приложения. /> Добавлен Scenedelegate и инициализированное окно с помощью WindowsCene, но большинство старых кодов все еще находятся внутри appdelegate < /p>
< /li>
< /ul>
class SceneDelegate: UIResponder, UIWindowSceneDelegate {
var window: UIWindow?
let appDelegate = UIApplication.shared.delegate as! TDRAppDelegate
func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
guard let scene = (scene as? UIWindowScene) else { return }
window = UIWindow(windowScene: scene)
window?.isHidden = false
appDelegate.window = window
appDelegate.initWithWindow()
}
}
< /code>
- (void)initWithWindow {
...
[self initViewControllers];
NSArray *tabArray = [self getTabArray];
self.mainTabVC = [[MainTabBarViewController alloc] init:tabArray];
self.window.rootViewController = self.mainTabVC;
[self.window setHidden:false];
...
}
< /code>
Added these 2 delegate functions to AppDelegate


Подробнее здесь: https://stackoverflow.com/questions/797 ... r-resizing