приложение работает полностью на 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


EDIT:
- I moved all logic codes to SceneDelegate, now AppDelegate wouldn't do anything.
- How navigation controller is created:
bookmarkNavigationController = UINavigationController(rootViewController: bookmark)
bookmarkNavigationController?.view.tag = TabID.TABID_BOOKMARK.rawValue
< /code>
- How navigation button is added:
self.clearAllBarButton.tintColor = UIColor.redColor;
self.navigationItem.leftBarButtonItems = @[self.clearAllBarButton];
< /code>
There is no other logic related to navigation controller or item. Issue still stays the same.
EDIT 2:
After updating to iOS 26 and Xcode beta 4, the three buttons doesn't overlap my left navigation item anymore, but is still different than other apps.

Подробнее здесь: https://stackoverflow.com/questions/797 ... r-resizing
Мобильная версия